Package org.mybatis.dynamic.sql.select
Class SimpleSortSpecification
- java.lang.Object
-
- org.mybatis.dynamic.sql.select.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)
-
-
-
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 interfaceSortSpecification
- 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 interfaceSortSpecification
- 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 interfaceSortSpecification
- Returns:
- true if the SortSpcification should render as descending
-
of
public static SimpleSortSpecification of(java.lang.String name)
-
-