Class OrderDefinition


  • public class OrderDefinition
    extends Object
    OrderDefinition is the object used to define the order in which you wish to receive data
    Since:
    1.4
    • Constructor Detail

      • OrderDefinition

        public OrderDefinition()
        Construct an order definition object. Use add(java.lang.String...) methods to add fields and directions to the sort.
    • Method Detail

      • add

        public OrderDefinition add​(String... flds)
        Add order definition field names, all ascending order
        Parameters:
        flds - the field names you wish to order on, first field being highest precedence.
      • add

        public OrderDefinition add​(OrderDefinition.Direction dir,
                                   String... flds)
        Add order definition field names, all in the same direction
        Parameters:
        dir - the Direction you want to use for these fields.
        flds - the field names you wish to order on, first field being highest precedence.
      • add

        public OrderDefinition add​(OrderDefinition.Direction[] dir,
                                   String... flds)
        Add order definition field names with the specified Direction. The number of Directions must be equal to the number of fields.
        Parameters:
        dir - the Direction you want to use for each field
        flds - the field names you wish to order on, first field being highest precedence.
      • getFieldsString

        public String getFieldsString()
      • getDirectionsString

        public String getDirectionsString()
      • toString

        public String toString()
        Produce a human readable representation of the OrderDefinition
        Overrides:
        toString in class Object
      • reverse

        public OrderDefinition reverse()
        Produce an OrderDefinition that is the exact opposite of this OrderDefinition.