javax.naming.ldap
Class SortKey

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.naming.ldap.SortKey

public class SortKey
extends Object sample code for java.lang.Object definition code for java.lang.Object

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.

Since:
1.5
See Also:
SortControl sample code for javax.naming.ldap.SortControl definition code for javax.naming.ldap.SortControl

Constructor Summary
SortKey sample code for javax.naming.ldap.SortKey.SortKey(java.lang.String) definition code for javax.naming.ldap.SortKey.SortKey(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  attrID)
          Creates the default sort key for an attribute.
SortKey sample code for javax.naming.ldap.SortKey.SortKey(java.lang.String, boolean, java.lang.String) definition code for javax.naming.ldap.SortKey.SortKey(java.lang.String, boolean, java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  attrID, boolean ascendingOrder, String sample code for java.lang.String definition code for java.lang.String  matchingRuleID)
          Creates a sort key for an attribute.
 
Method Summary
 String sample code for java.lang.String definition code for java.lang.String getAttributeID sample code for javax.naming.ldap.SortKey.getAttributeID() definition code for javax.naming.ldap.SortKey.getAttributeID() ()
          Retrieves the attribute ID of the sort key.
 String sample code for java.lang.String definition code for java.lang.String getMatchingRuleID sample code for javax.naming.ldap.SortKey.getMatchingRuleID() definition code for javax.naming.ldap.SortKey.getMatchingRuleID() ()
          Retrieves the matching rule ID used to order the attribute values.
 boolean isAscending sample code for javax.naming.ldap.SortKey.isAscending() definition code for javax.naming.ldap.SortKey.isAscending() ()
          Determines the sort order.
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

SortKey sample code for javax.naming.ldap.SortKey(java.lang.String) definition code for javax.naming.ldap.SortKey(java.lang.String)

public SortKey(String sample code for java.lang.String definition code for java.lang.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 - The non-null ID of the attribute to be used as a sort key.

SortKey sample code for javax.naming.ldap.SortKey(java.lang.String, boolean, java.lang.String) definition code for javax.naming.ldap.SortKey(java.lang.String, boolean, java.lang.String)

public SortKey(String sample code for java.lang.String definition code for java.lang.String  attrID,
               boolean ascendingOrder,
               String sample code for java.lang.String definition code for java.lang.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 - The non-null ID of the attribute to be used as a sort key.
ascendingOrder - If true then entries are arranged in ascending order. Otherwise there are arranged in descending order.
matchingRuleID - 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

getAttributeID sample code for javax.naming.ldap.SortKey.getAttributeID() definition code for javax.naming.ldap.SortKey.getAttributeID()

public String sample code for java.lang.String definition code for java.lang.String  getAttributeID()
Retrieves the attribute ID of the sort key.

Returns:
The non-null Attribute ID of the sort key.

isAscending sample code for javax.naming.ldap.SortKey.isAscending() definition code for javax.naming.ldap.SortKey.isAscending()

public boolean isAscending()
Determines the sort order.

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

getMatchingRuleID sample code for javax.naming.ldap.SortKey.getMatchingRuleID() definition code for javax.naming.ldap.SortKey.getMatchingRuleID()

public String sample code for java.lang.String definition code for java.lang.String  getMatchingRuleID()
Retrieves the matching rule ID used to order the attribute values.

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