com.netscape.jndi.ldap.controls

Class LdapSortKey

public class LdapSortKey extends LDAPSortKey

Represents sorting instructions for a particular attribute.
Constructor Summary
LdapSortKey(String keyDescription)
Constructs a new LdapSortKey object that will sort based on the specified instructions.
LdapSortKey(String key, boolean reverse)
Constructs a new LdapSortKey object that will sort based on the specified attribute and sort order.
LdapSortKey(String key, boolean reverse, String matchRule)
Constructs a new LdapSortKey object that will sort based on the specified attribute, sort order, and matching rule.
Method Summary
StringgetKey()
Returns the attribute to sort by.
StringgetMatchRule()
Returns the object ID (OID) of the matching rule used for sorting.
booleangetReverse()
Returns true if sorting is to be done in descending order.

Constructor Detail

LdapSortKey

public LdapSortKey(String keyDescription)
Constructs a new LdapSortKey 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:

See Also: LdapSortControl LdapVirtualListControl

LdapSortKey

public LdapSortKey(String key, boolean reverse)
Constructs a new LdapSortKey object that will sort based on the specified attribute and sort order.

Parameters: key A single attribute to sort by. For example:

reverse If true, the sorting is done in descending order.

See Also: LdapSortControl LdapVirtualListControl

LdapSortKey

public LdapSortKey(String key, boolean reverse, String matchRule)
Constructs a new LdapSortKey object that will sort based on the specified attribute, sort order, and matching rule.

Parameters: key A single attribute to sort by. For example:

reverse If true, 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 String getKey()
Returns the attribute to sort by.

Returns: A single attribute to sort by.

getMatchRule

public String 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.

getReverse

public boolean getReverse()
Returns true if sorting is to be done in descending order.

Returns: true if sorting is to be done in descending order.