Package com.jbstrap.core.dao
Class Order
java.lang.Object
com.jbstrap.core.dao.Order
POJO class for ordering
With this class, ordering conditions can be described and used for queries. This class can be used for direct queries, and with data handling components
- Since:
- 4.0
- Author:
- JBStrap
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the column name, that is used for orderingGets the ordering typesetOrderType
(OrderType type) Sets the order typetoString()
Returns a String representation of the Order POJO class
-
Constructor Details
-
Order
Creates an Order, that will sort in ascending order- Parameters:
columnName
- The name of the column, which will be used as a base for the ascending ordering- Throws:
NullPointerException
- If the columnName isnull
-
Order
Creates an Order, with the specified ordering type- Parameters:
columnName
- The name of the column, which will be used as a base for the orderingtype
- The ordering type. This can be specified by usingOrderType
enum value. Ifnull
it will order in an ascending order.- Throws:
NullPointerException
- If the columnName isnull
-
-
Method Details
-
getColumnName
Gets the column name, that is used for ordering- Returns:
- The column name
-
getOrderType
Gets the ordering type- Returns:
- The ordering type
-
setOrderType
Sets the order type- Parameters:
type
- The new ordering type. If specified asnull
, it will sort in an ascending order- Returns:
- The Order POJO class
-
toString
Returns a String representation of the Order POJO class
This String representation contains the column name and the ordering type
-