com.sun.jndi.ldap.ctl
Class SortKey

java.lang.Object
  extended by com.sun.jndi.ldap.ctl.SortKey

public class SortKey
extends java.lang.Object

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

Field Summary
private  java.lang.String attrID
           
private  java.lang.String matchingRuleID
           
private  boolean reverseOrder
           
 
Constructor Summary
SortKey(java.lang.String attrID)
          Constructs a new instance of SortKey.
SortKey(java.lang.String attrID, boolean ascendingOrder, java.lang.String matchingRuleID)
          Constructs a new instance of SortKey.
 
Method Summary
 java.lang.String getAttributeID()
          Retrieves the attribute ID of the sort key.
 java.lang.String getMatchingRuleID()
          Retrieves the matching rule ID used to order the attribute values.
 boolean isAscending()
          Determines the sort order.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attrID

private java.lang.String attrID

reverseOrder

private boolean reverseOrder

matchingRuleID

private java.lang.String matchingRuleID
Constructor Detail

SortKey

public SortKey(java.lang.String attrID)
Constructs a new instance of SortKey.

Parameters:
attrID - The ID of the attribute to be used as a sort key.

SortKey

public SortKey(java.lang.String attrID,
               boolean ascendingOrder,
               java.lang.String matchingRuleID)
Constructs a new instance of SortKey.

Parameters:
attrID - The ID of the attribute to be used as a sort key.
ascendingOrder - If true then entries are arranged in ascending order. Otherwise there are in descending order.
matchingRule - 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

public java.lang.String getAttributeID()
Retrieves the attribute ID of the sort key.

Returns:
Attribute ID of the sort key.

isAscending

public boolean isAscending()
Determines the sort order.

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

getMatchingRuleID

public 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.