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
- All Implemented Interfaces:
- Serializable
public class DBOrderByExpr
- extends DBExpr
- See Also:
- Serialized Form
Constructor Summary |
DBOrderByExpr(DBColumnExpr expr,
boolean desc)
Construct a new DBOrderByInfo object set the specified
parameters to this object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expr
protected final DBColumnExpr expr
desc
protected boolean desc
DBOrderByExpr
public DBOrderByExpr(DBColumnExpr expr,
boolean desc)
- Construct a new DBOrderByInfo object set the specified
parameters to this object.
- Parameters:
expr
- the columndesc
- set true for descending or false for ascending
getColumnExpr
public DBColumnExpr getColumnExpr()
getColumn
public DBColumn getColumn()
isDescending
public boolean isDescending()
setDescending
public void setDescending(boolean descending)
getDatabase
public DBDatabase getDatabase()
- Description copied from class:
DBObject
- Returns the database object to which this object belongs to.
For the database object itself this function will return the this pointer.
- Specified by:
getDatabase
in class DBObject
- Returns:
- the database object
addReferencedColumns
public void addReferencedColumns(Set<DBColumn> list)
- Description copied from class:
DBExpr
- Internal function to obtain all DBColumnExpr-objects used by this expression.
- Specified by:
addReferencedColumns
in class DBExpr
- Parameters:
list
- list to which all used column expressions must be added
addSQL
public void addSQL(StringBuilder buf,
long context)
- Adds a column expression to the orderBy clause followed by the desc keyword if the order should be descending
- Specified by:
addSQL
in class DBExpr
- Parameters:
buf
- the SQL-Commandcontext
- the current SQL-Command context
Copyright © 2008–2014 Apache Software Foundation. All rights reserved.