Class Order

java.lang.Object
overit.geocall.bl.Order
All Implemented Interfaces:
Serializable

public class Order extends Object implements Serializable
Class used to sort lists of DynO objects.
An order is characterized by a list of attributes and a list of OrderCriterion:
  • a list of attributes, composed by the individual attributes of the DynO object, that will be used as comparators
  • a list of OrderCriterion, i.e. a list of comparator criteria (ascending/descending)
Since:
1.0
See Also:
  • Constructor Details

    • Order

      public Order()
  • Method Details

    • getAttributes

      public List<String> getAttributes()
      Returns the list of attributes that will be used as comparators.
      Returns:
      a list of attributes
      See Also:
    • getCriteria

      public List<OrderCriterion> getCriteria()
      Returns the list of OrderCriterion indicating the type of ordering.
      Returns:
      a list of OrderCriterion
      See Also:
    • hasOrderCriteria

      public boolean hasOrderCriteria()
      Checks if the order has any criteria.
      Returns:
      true if order the order has any criteria, false otherwise
    • addAttributeOrderCriterion

      public void addAttributeOrderCriterion(String attribute, OrderCriterion criterion)
      Adds the given attribute and the given order criterion to the current order.
      Parameters:
      attribute - the attribute
      criterion - the criterion