Package org.apache.empire.db.expr.order
Class DBOrderByExpr
java.lang.Object
org.apache.empire.db.DBObject
org.apache.empire.db.DBExpr
org.apache.empire.db.expr.order.DBOrderByExpr
-
Field Summary
FieldsFields inherited from class org.apache.empire.db.DBExpr
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESIS, CTX_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionDBOrderByExpr(DBColumnExpr expr, boolean desc) Construct a new DBOrderByInfo object set the specified parameters to this object. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReferencedColumns(Set<DBColumn> list) Internal function to obtain all DBColumnExpr-objects used by this expression.voidaddSQL(DBSQLBuilder sql, long context) Adds a column expression to the orderBy clause followed by the desc keyword if the order should be descendingfinal DBDatabaseReturns the database object to which this object belongs to.booleanvoidsetDescending(boolean descending) Methods inherited from class org.apache.empire.db.DBObject
checkParamNull
-
Field Details
-
expr
-
desc
protected boolean desc
-
-
Constructor Details
-
DBOrderByExpr
Construct a new DBOrderByInfo object set the specified parameters to this object.- Parameters:
expr- the columndesc- set true for descending or false for ascending
-
-
Method Details
-
getColumn
-
isDescending
public boolean isDescending() -
setDescending
public void setDescending(boolean descending) -
getDatabase
Description copied from class:DBObjectReturns the database object to which this object belongs to. For the database object itself this function will return the this pointer.- Specified by:
getDatabasein classDBObject- Returns:
- the database object
-
addReferencedColumns
Description copied from class:DBExprInternal function to obtain all DBColumnExpr-objects used by this expression.- Specified by:
addReferencedColumnsin classDBExpr- Parameters:
list- list to which all used column expressions must be added
-
addSQL
Adds a column expression to the orderBy clause followed by the desc keyword if the order should be descending
-