Class QueryOrderPart


public final class QueryOrderPart extends QueryPart
One ORDER BY entry: a field, its direction and optional null placement.
  • Constructor Details

    • QueryOrderPart

      public QueryOrderPart()
    • QueryOrderPart

      public QueryOrderPart(String field, boolean ascending)
    • QueryOrderPart

      public QueryOrderPart(String field, boolean ascending, Boolean nullsFirst)
  • Method Details

    • getField

      public String getField()
    • setField

      public QueryOrderPart setField(String field)
    • isAscending

      public boolean isAscending()
      Indicates if the field sorts in ascending order; otherwise DESC is added (default is false).
    • setAscending

      public QueryOrderPart setAscending(boolean ascending)
      Indicates if the field sorts in ascending order; otherwise DESC is added (default is false).
    • getNullsFirst

      public Boolean getNullsFirst()
      Indicates if nulls sort first (NULLS FIRST) or last (NULLS LAST); null, the default, adds neither.
    • setNullsFirst

      public QueryOrderPart setNullsFirst(Boolean nullsFirst)
      Indicates if nulls sort first (NULLS FIRST) or last (NULLS LAST); null, the default, adds neither.
    • collectSqlFragment

      public void collectSqlFragment(CodeWriter writer)
      Description copied from class: SqlPart
      Writes this part's SQL to the writer; used by SqlPart.getSqlFragment() and by enclosing parts.
      Specified by:
      collectSqlFragment in class SqlPart