Package netscape.ldap
Class LDAPSortKey
- java.lang.Object
-
- netscape.ldap.LDAPSortKey
-
- All Implemented Interfaces:
java.io.Serializable
public class LDAPSortKey extends java.lang.Object implements java.io.SerializableRepresents sorting instructions for a particular attribute.- Version:
- 1.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intREVERSE
-
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 by which to sort.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.java.lang.StringtoString()
-
-
-
Field Detail
-
REVERSE
public static final int REVERSE
- See Also:
- Constant Field Values
-
-
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 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 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 by which to sort. 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 by which to sort. For example:"cn"(sort by thecnattribute)"givenname"(sort by thegivennameattribute)
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:
LDAPSortControl,LDAPVirtualListControl
-
-
Method Detail
-
getKey
public java.lang.String getKey()
Returns the attribute by which to sort.- Returns:
- a single attribute by which to sort.
-
getReverse
public boolean getReverse()
Returnstrueif sorting is to be done in descending order.- 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.- Returns:
- the object ID (OID) of the matching rule, or
nullif the sorting instructions specify no matching rule.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-