|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.unboundid.ldap.sdk.controls.SortKey
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class SortKey
This class provides a data structure for representing a sort key that is to
be used in conjunction with the ServerSideSortRequestControl
for
requesting that the server sort the results before returning them to the
client.
A sort key includes the following elements:
reverseOrder
flag that indicates whether the results should
be sorted in ascending order (if the value is false
) or
descending order (if the value is true
).
Constructor Summary | |
---|---|
SortKey(java.lang.String attributeName)
Creates a new sort key with the specified attribute name. |
|
SortKey(java.lang.String attributeName,
boolean reverseOrder)
Creates a new sort key with the specified attribute name. |
|
SortKey(java.lang.String attributeName,
java.lang.String matchingRuleID,
boolean reverseOrder)
Creates a new sort key with the provided information. |
Method Summary | |
---|---|
static SortKey |
decode(ASN1Element element)
Decodes the provided ASN.1 element as a sort key. |
java.lang.String |
getAttributeName()
Retrieves the attribute name for this sort key. |
java.lang.String |
getMatchingRuleID()
Retrieves the name or OID of the ordering matching rule that should be used to perform the sort, if defined. |
boolean |
reverseOrder()
Indicates whether the sort should be performed in reverse order. |
java.lang.String |
toString()
Retrieves a string representation of this sort key. |
void |
toString(java.lang.StringBuilder buffer)
Appends a string representation of this sort key to the provided buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SortKey(java.lang.String attributeName)
attributeName
- The attribute name for this sort key. It must not
be null
.public SortKey(java.lang.String attributeName, boolean reverseOrder)
attributeName
- The attribute name for this sort key. It must not
be null
.reverseOrder
- Indicates whether the sort should be performed in
reverse order.public SortKey(java.lang.String attributeName, java.lang.String matchingRuleID, boolean reverseOrder)
attributeName
- The attribute name for this sort key. It must not
be null
.matchingRuleID
- The name or OID of the ordering matching rule that
should be used to perform the sort. It may be
null
if the default ordering matching rule
for the specified attribute is to be used.reverseOrder
- Indicates whether the sort should be performed in
reverse order.Method Detail |
---|
public java.lang.String getAttributeName()
public java.lang.String getMatchingRuleID()
null
if the sort should use the
default ordering matching rule associated with the specified
attribute.public boolean reverseOrder()
true
if the sort should be performed in reverse order, or
false
if it should be performed in the standard order for
the associated ordering matching rule.public static SortKey decode(ASN1Element element) throws LDAPException
element
- The ASN.1 element to decode as a sort key.
LDAPException
- If the provided ASN.1 element cannot be decoded as
a sort key.public java.lang.String toString()
toString
in class java.lang.Object
public void toString(java.lang.StringBuilder buffer)
buffer
- The buffer to which to append a string representation of
this sort key.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |