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. |
Method Summary |
void |
addReferencedColumns(Set<DBColumn> list)
Internal function to obtain all DBColumnExpr-objects used by this expression. |
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 |
DBDatabase |
getDatabase()
Returns the database object to which this object belongs to. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expr
public DBColumnExpr expr
desc
public 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
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-2011 Apache Software Foundation. All Rights Reserved.