Class OrderByList

java.lang.Object
org.apache.ofbiz.entity.condition.OrderByList
All Implemented Interfaces:
Comparator<GenericEntity>

public class OrderByList extends Object implements Comparator<GenericEntity>
  • Constructor Details

    • OrderByList

      public OrderByList()
    • OrderByList

      public OrderByList(String... orderByList)
    • OrderByList

      public OrderByList(Collection<String> orderByList)
  • Method Details

    • addOrderBy

      public void addOrderBy(String... orderByList)
      Add order by.
      Parameters:
      orderByList - the order by list
    • addOrderBy

      public void addOrderBy(Collection<String> orderByList)
      Add order by.
      Parameters:
      orderByList - the order by list
    • addOrderBy

      public void addOrderBy(String text)
      Add order by.
      Parameters:
      text - the text
    • addOrderBy

      public void addOrderBy(EntityConditionValue value)
      Add order by.
      Parameters:
      value - the value
    • addOrderBy

      public void addOrderBy(EntityConditionValue value, boolean descending)
      Add order by.
      Parameters:
      value - the value
      descending - the descending
    • addOrderBy

      public void addOrderBy(OrderByItem orderByItem)
      Add order by.
      Parameters:
      orderByItem - the order by item
    • checkOrderBy

      public void checkOrderBy(ModelEntity modelEntity) throws GenericModelException
      Check order by.
      Parameters:
      modelEntity - the model entity
      Throws:
      GenericModelException - the generic model exception
    • makeOrderByString

      public String makeOrderByString(ModelEntity modelEntity, boolean includeTablenamePrefix, Datasource datasourceInfo)
      Make order by string string.
      Parameters:
      modelEntity - the model entity
      includeTablenamePrefix - the include tablename prefix
      datasourceInfo - the datasource info
      Returns:
      the string
    • makeOrderByString

      public void makeOrderByString(StringBuilder sb, ModelEntity modelEntity, boolean includeTablenamePrefix, Datasource datasourceInfo)
      Make order by string.
      Parameters:
      sb - the sb
      modelEntity - the model entity
      includeTablenamePrefix - the include tablename prefix
      datasourceInfo - the datasource info
    • compare

      public int compare(GenericEntity entity1, GenericEntity entity2)
      Specified by:
      compare in interface Comparator<GenericEntity>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface Comparator<GenericEntity>
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object