Package netscape.ldap
Class LDAPSortKey
java.lang.Object
netscape.ldap.LDAPSortKey
- All Implemented Interfaces:
Serializable
Represents sorting instructions for a particular attribute.
- Version:
- 1.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLDAPSortKey
(String keyDescription) Constructs a newLDAPSortKey
object that will sort based on the specified instructions.LDAPSortKey
(String key, boolean reverse) Constructs a newLDAPSortKey
object that will sort based on the specified attribute and sort order.LDAPSortKey
(String key, boolean reverse, String matchRule) Constructs a newLDAPSortKey
object that will sort based on the specified attribute, sort order, and matching rule. -
Method Summary
-
Field Details
-
REVERSE
public static final int REVERSE- See Also:
-
-
Constructor Details
-
LDAPSortKey
Constructs a newLDAPSortKey
object that will sort based on the specified instructions.- Parameters:
keyDescription
- a single attribute specification by which to sort If preceded by a hyphen ("-"), the attribute is sorted in reverse order. You can also specify the object ID (OID) of a matching rule after a colon (":"). For example:"cn"
(sort by thecn
attribute)"-cn"
(sort by thecn
attribute in reverse order)"-cn:1.2.3.4"
(sort by thecn
attribute in reverse order and use the matching rule identified by the OID 1.2.3.4)
- See Also:
-
LDAPSortKey
Constructs a newLDAPSortKey
object that will sort based on the specified attribute and sort order.- Parameters:
key
- a single attribute by which to sort. For example:"cn"
(sort by thecn
attribute)"givenname"
(sort by thegivenname
attribute)
reverse
- iftrue
, the sorting is done in descending order- See Also:
-
LDAPSortKey
Constructs a newLDAPSortKey
object that will sort based on the specified attribute, sort order, and matching rule.- Parameters:
key
- a single attribute by which to sort. For example:"cn"
(sort by thecn
attribute)"givenname"
(sort by thegivenname
attribute)
reverse
- iftrue
, the sorting is done in descending ordermatchRule
- object ID (OID) of the matching rule for the attribute (for example,1.2.3.4
)- See Also:
-
-
Method Details
-
getKey
Returns the attribute by which to sort.- Returns:
- a single attribute by which to sort.
-
getReverse
public boolean getReverse()Returnstrue
if sorting is to be done in descending order.- Returns:
true
if sorting is to be done in descending order.
-
getMatchRule
Returns the object ID (OID) of the matching rule used for sorting. If no matching rule is specified,null
is returned.- Returns:
- the object ID (OID) of the matching rule, or
null
if the sorting instructions specify no matching rule.
-
toString
-