netscape.ldap
Class LDAPSortKey
java.lang.Object
netscape.ldap.LDAPSortKey
- java.io.Serializable
public class LDAPSortKey
extends java.lang.Object
implements java.io.Serializable
Represents sorting instructions for a particular attribute.
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.
|
String | getKey() - Returns the attribute by which to sort.
|
String | getMatchRule() - Returns the object ID (OID) of the matching rule used for sorting.
|
boolean | getReverse() - Returns
true if sorting is to be done in descending order.
|
String | toString()
|
REVERSE
public static final int REVERSE
LDAPSortKey
public LDAPSortKey(String keyDescription)
Constructs a new LDAPSortKey
object that will
sort based on the specified instructions.
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 the cn
attribute)
"-cn"
(sort by the cn
attribute in
reverse order)
"-cn:1.2.3.4"
(sort by the cn
attribute in reverse order and use the matching rule identified
by the OID 1.2.3.4)
LDAPSortKey
public LDAPSortKey(String key,
boolean reverse)
Constructs a new LDAPSortKey
object that will
sort based on the specified attribute and sort order.
key
- a single attribute by which to sort. For example:
"cn"
(sort by the cn
attribute)
"givenname"
(sort by the givenname
attribute)
reverse
- if true
, the sorting is done in
descending order
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.
key
- a single attribute by which to sort. For example:
"cn"
(sort by the cn
attribute)
"givenname"
(sort by the givenname
attribute)
reverse
- if true
, the sorting is done in
descending ordermatchRule
- object ID (OID) of the matching rule for
the attribute (for example, 1.2.3.4
)
getKey
public String getKey()
Returns the attribute by which to sort.
- a single attribute by which to sort.
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.
- 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.
true
if sorting is to be done in descending order.
toString
public String toString()