Top Description Fields Constructors Methods
javax.naming.ldap

public Class SortKey

extends Object
Class Inheritance

A sort key and its associated sort parameters. This class implements a sort key which is used by the LDAPv3 Control for server-side sorting of search results as defined in RFC 2891.
Author
Vincent Ryan
Since
1.5
See Also
SortControl

Field Summary

Modifier and TypeField and Description
private String
private String
private boolean

Constructor Summary

AccessConstructor and Description
public
SortKey(String
The non-null ID of the attribute to be used as a sort key.
attrID
)

Creates the default sort key for an attribute.

public
SortKey(String
The non-null ID of the attribute to be used as a sort key.
attrID
,
boolean
If true then entries are arranged in ascending order. Otherwise there are arranged in descending order.
ascendingOrder
,
String
The possibly null ID of the matching rule to use to order the attribute values. If not specified then the ordering matching rule defined for the sort key attribute is used.
matchingRuleID
)

Creates a sort key for an attribute.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The non-null Attribute ID of the sort key.
getAttributeID
()

Retrieves the attribute ID of the sort key.

public String

Returns:

The possibly null matching rule ID. If null then the ordering matching rule defined for the sort key attribute is used.
getMatchingRuleID
()

Retrieves the matching rule ID used to order the attribute values.

public boolean

Returns:

true if the sort order is ascending, false if descending.
isAscending
()

Determines the sort order.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attrIDback to summary
private String attrID
matchingRuleIDback to summary
private String matchingRuleID
reverseOrderback to summary
private boolean reverseOrder

Constructor Detail

SortKeyback to summary
public SortKey(String attrID)

Creates the default sort key for an attribute. Entries will be sorted according to the specified attribute in ascending order using the ordering matching rule defined for use with that attribute.

Parameters
attrID:String

The non-null ID of the attribute to be used as a sort key.

SortKeyback to summary
public SortKey(String attrID, boolean ascendingOrder, String matchingRuleID)

Creates a sort key for an attribute. Entries will be sorted according to the specified attribute in the specified sort order and using the specified matching rule, if supplied.

Parameters
attrID:String

The non-null ID of the attribute to be used as a sort key.

ascendingOrder:boolean

If true then entries are arranged in ascending order. Otherwise there are arranged in descending order.

matchingRuleID:String

The possibly null ID of the matching rule to use to order the attribute values. If not specified then the ordering matching rule defined for the sort key attribute is used.

Method Detail

getAttributeIDback to summary
public String getAttributeID()

Retrieves the attribute ID of the sort key.

Returns:String

The non-null Attribute ID of the sort key.

getMatchingRuleIDback to summary
public String getMatchingRuleID()

Retrieves the matching rule ID used to order the attribute values.

Returns:String

The possibly null matching rule ID. If null then the ordering matching rule defined for the sort key attribute is used.

isAscendingback to summary
public boolean isAscending()

Determines the sort order.

Returns:boolean

true if the sort order is ascending, false if descending.