Class SimpleSortSpecification

  • All Implemented Interfaces:
    SortSpecification

    public class SimpleSortSpecification
    extends java.lang.Object
    implements SortSpecification
    This class is used for an order by phrase where there is no suitable column name to use (for example a calculated column or an aggregate column).
    Author:
    Jeff Butler
    • Method Summary

      Modifier and Type Method Description
      java.lang.String aliasOrName()
      Return the column alias or column name.
      SortSpecification descending()
      Returns a new instance of the SortSpecification that should render as descending in an ORDER BY clause.
      boolean isDescending()
      Return true if the sort order is descending.
      static SimpleSortSpecification of​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • descending

        public SortSpecification descending()
        Description copied from interface: SortSpecification
        Returns a new instance of the SortSpecification that should render as descending in an ORDER BY clause.
        Specified by:
        descending in interface SortSpecification
        Returns:
        new instance of SortSpecification
      • aliasOrName

        public java.lang.String aliasOrName()
        Description copied from interface: SortSpecification
        Return the column alias or column name.
        Specified by:
        aliasOrName in interface SortSpecification
        Returns:
        the column alias if one has been specified by the user, or else the column name
      • isDescending

        public boolean isDescending()
        Description copied from interface: SortSpecification
        Return true if the sort order is descending.
        Specified by:
        isDescending in interface SortSpecification
        Returns:
        true if the SortSpcification should render as descending