Class SortRequestControl

java.lang.Object
org.ldaptive.control.AbstractControl
org.ldaptive.control.SortRequestControl
All Implemented Interfaces:
Control, RequestControl

public class SortRequestControl extends AbstractControl implements RequestControl
Request control for server side sorting. See RFC 2891. Control is defined as:
   SortKeyList ::= SEQUENCE OF SEQUENCE {
      attributeType   AttributeDescription,
      orderingRule    [0] MatchingRuleId OPTIONAL,
      reverseOrder    [1] BOOLEAN DEFAULT FALSE }
 
  • Field Details

  • Constructor Details

    • SortRequestControl

      public SortRequestControl()
      Default constructor.
    • SortRequestControl

      public SortRequestControl(SortKey[] keys)
      Creates a new sort request control.
      Parameters:
      keys - sort keys
    • SortRequestControl

      public SortRequestControl(SortKey[] keys, boolean critical)
      Creates a new sort request control.
      Parameters:
      keys - sort keys
      critical - whether this control is critical
  • Method Details

    • hasValue

      public boolean hasValue()
      Description copied from interface: RequestControl
      Returns whether the control has a value associated with it.
      Specified by:
      hasValue in interface RequestControl
      Returns:
      whether the control has a value
    • getSortKeys

      public SortKey[] getSortKeys()
      Returns the sort keys.
      Returns:
      sort keys
    • setSortKeys

      public void setSortKeys(SortKey[] keys)
      Sets the sort keys.
      Parameters:
      keys - sort keys
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class AbstractControl
    • hashCode

      public int hashCode()
      Description copied from class: AbstractControl
      Returns the hash code for this object.
      Specified by:
      hashCode in class AbstractControl
      Returns:
      hash code
    • toString

      public String toString()
      Overrides:
      toString in class AbstractControl
    • encode

      public byte[] encode()
      Description copied from interface: RequestControl
      Provides the BER encoding of this control.
      Specified by:
      encode in interface RequestControl
      Returns:
      BER encoded request control