Package com.netscape.jndi.ldap.controls
Class LdapSortKey
java.lang.Object
netscape.ldap.LDAPSortKey
com.netscape.jndi.ldap.controls.LdapSortKey
- All Implemented Interfaces:
Serializable
public class LdapSortKey
extends netscape.ldap.LDAPSortKey
Represents sorting instructions for a particular attribute.
- See Also:
-
Field Summary
Fields inherited from class netscape.ldap.LDAPSortKey
REVERSE
-
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
Modifier and TypeMethodDescriptiongetKey()
Returns the attribute to sort by.Returns the object ID (OID) of the matching rule used for sorting.boolean
Returnstrue
if sorting is to be done in descending order.Methods inherited from class netscape.ldap.LDAPSortKey
toString
-
Constructor Details
-
LdapSortKey
Constructs a newLdapSortKey
object that will sort based on the specified instructions.- Parameters:
keyDescription
- A single attribute specification to sort by. 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 to sort by. 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 to sort by. For example:"cn"
(sort by thecn
attribute)"givenname"
(sort by thegivenname
attribute)
reverse
- Iftrue
, the sorting is done in descending order.matchRule
- Object ID (OID) of the matching rule for the attribute (for example,1.2.3.4
).- See Also:
-
-
Method Details
-
getKey
Returns the attribute to sort by.- Overrides:
getKey
in classnetscape.ldap.LDAPSortKey
- Returns:
- A single attribute to sort by.
-
getReverse
public boolean getReverse()Returnstrue
if sorting is to be done in descending order.- Overrides:
getReverse
in classnetscape.ldap.LDAPSortKey
- 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.- Overrides:
getMatchRule
in classnetscape.ldap.LDAPSortKey
- Returns:
- The object ID (OID) of the matching rule, or
null
if the sorting instructions specify no matching rule.
-