Package org.mybatis.dynamic.sql
Interface SortSpecification
-
- All Known Implementing Classes:
ColumnSortSpecification
,SimpleSortSpecification
,SqlColumn
public interface SortSpecification
Defines attributes of columns that are necessary for rendering an order by expression.- Author:
- Jeff Butler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.String
orderByName()
Return the phrase that should be written into a rendered order by clause.
-
-
-
Method Detail
-
descending
SortSpecification descending()
Returns a new instance of the SortSpecification that should render as descending in an ORDER BY clause.- Returns:
- new instance of SortSpecification
-
orderByName
String orderByName()
Return the phrase that should be written into a rendered order by clause. This should NOT include the "DESC" word for descending sort specifications.- Returns:
- the order by phrase
-
isDescending
boolean isDescending()
Return true if the sort order is descending.- Returns:
- true if the SortSpecification should render as descending
-
-