Package com.netscape.jndi.ldap.controls
Class LdapSortKey
- java.lang.Object
-
- netscape.ldap.LDAPSortKey
-
- com.netscape.jndi.ldap.controls.LdapSortKey
-
- All Implemented Interfaces:
java.io.Serializable
public class LdapSortKey extends netscape.ldap.LDAPSortKeyRepresents sorting instructions for a particular attribute.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LdapSortKey(java.lang.String keyDescription)Constructs a newLdapSortKeyobject that will sort based on the specified instructions.LdapSortKey(java.lang.String key, boolean reverse)Constructs a newLdapSortKeyobject that will sort based on the specified attribute and sort order.LdapSortKey(java.lang.String key, boolean reverse, java.lang.String matchRule)Constructs a newLdapSortKeyobject that will sort based on the specified attribute, sort order, and matching rule.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetKey()Returns the attribute to sort by.java.lang.StringgetMatchRule()Returns the object ID (OID) of the matching rule used for sorting.booleangetReverse()Returnstrueif sorting is to be done in descending order.
-
-
-
Constructor Detail
-
LdapSortKey
public LdapSortKey(java.lang.String keyDescription)
Constructs a newLdapSortKeyobject 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 thecnattribute)"-cn"(sort by thecnattribute in reverse order)"-cn:1.2.3.4"(sort by thecnattribute in reverse order and use the matching rule identified by the OID 1.2.3.4)
- See Also:
LdapSortControl,LdapVirtualListControl
-
LdapSortKey
public LdapSortKey(java.lang.String key, boolean reverse)Constructs a newLdapSortKeyobject that will sort based on the specified attribute and sort order.- Parameters:
key- A single attribute to sort by. For example:"cn"(sort by thecnattribute)"givenname"(sort by thegivennameattribute)
reverse- Iftrue, the sorting is done in descending order.- See Also:
LdapSortControl,LdapVirtualListControl
-
LdapSortKey
public LdapSortKey(java.lang.String key, boolean reverse, java.lang.String matchRule)Constructs a newLdapSortKeyobject 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 thecnattribute)"givenname"(sort by thegivennameattribute)
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:
LdapSortControl,LdapVirtualListControl
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Returns the attribute to sort by.- Overrides:
getKeyin classnetscape.ldap.LDAPSortKey- Returns:
- A single attribute to sort by.
-
getReverse
public boolean getReverse()
Returnstrueif sorting is to be done in descending order.- Overrides:
getReversein classnetscape.ldap.LDAPSortKey- Returns:
trueif sorting is to be done in descending order.
-
getMatchRule
public java.lang.String getMatchRule()
Returns the object ID (OID) of the matching rule used for sorting. If no matching rule is specified,nullis returned.- Overrides:
getMatchRulein classnetscape.ldap.LDAPSortKey- Returns:
- The object ID (OID) of the matching rule, or
nullif the sorting instructions specify no matching rule.
-
-