public class DBOrderByExpr extends DBExpr
Modifier and Type | Field and Description |
---|---|
protected boolean |
desc |
protected DBColumnExpr |
expr |
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESES, CTX_VALUE
Constructor and Description |
---|
DBOrderByExpr(DBColumnExpr expr,
boolean desc)
Construct a new DBOrderByInfo object set the specified
parameters to this object.
|
Modifier and Type | Method and Description |
---|---|
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
|
DBColumn |
getColumn() |
DBColumnExpr |
getColumnExpr() |
DBDatabase |
getDatabase()
Returns the database object to which this object belongs to.
|
boolean |
isDescending() |
void |
setDescending(boolean descending) |
getObjectValue, getValueClass
protected final DBColumnExpr expr
protected boolean desc
public DBOrderByExpr(DBColumnExpr expr, boolean desc)
expr
- the columndesc
- set true for descending or false for ascendingpublic DBColumnExpr getColumnExpr()
public DBColumn getColumn()
public boolean isDescending()
public void setDescending(boolean descending)
public DBDatabase getDatabase()
DBObject
getDatabase
in class DBObject
public void addReferencedColumns(Set<DBColumn> list)
DBExpr
addReferencedColumns
in class DBExpr
list
- list to which all used column expressions must be addedpublic void addSQL(StringBuilder buf, long context)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.