public class OrderByObject extends AbstractSQLFragment
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ASC
Ascending order (ASC)
|
static java.lang.String |
DESC
Descending order (DESC)
|
static java.lang.String |
NULLS_FIRST
Order with null values first.
|
static java.lang.String |
NULLS_LAST
Order with null values last.
|
static java.lang.String |
TYPE |
AS, COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, LEFT_PAREN, NEWLINE, RIGHT_PAREN, SPACE| Constructor and Description |
|---|
OrderByObject()
Constructs and empty ORDER BY object.
|
OrderByObject(SQLFragment exp)
Constructs an ORDER BY object with the given expression and no ordering.
|
OrderByObject(SQLFragment exp,
java.lang.String ordering)
Constructs an ORDER BY object with the given expression and ordering
constraint (either OrderByObject.DESC or OrderByObject.ASC)
|
OrderByObject(SQLFragment exp,
java.lang.String ordering,
java.lang.String nullsOrder)
Constructs an ORDER BY object with the given expression, ordering and
null ordering.
|
| Modifier and Type | Method and Description |
|---|---|
SQLFragment |
getExpression()
Gets the expression for this ORDER BY object.
|
java.lang.String |
getNullOrdering()
Returns whether the ordering of nulls has been set (NULLS_FIRST, NULLS_LAST
or null).
|
java.lang.String |
getOrder()
Gets the ordering for this clause (can be
null). |
java.lang.String |
getSQLText()
Returns the SQL for this ORDER BY object.
|
java.lang.String |
getType()
Returns the type of this object.
|
void |
setExpression(SQLFragment exp)
Sets the expression for this ORDER BY object.
|
void |
setNullOrdering(java.lang.String nullOrdering)
Sets the ordering of nulls for this order by object (NULLS_FIRST,
NULLS_LAST or null).
|
void |
setOrder(java.lang.String order)
Sets the ordering of this ORDER BY object.
|
appendToBuffer, appendToBuffer, argsToString, getName, getStartOffset, getTextOrNull, getTextOrNull, setStartOffset, surroundWithBrackets, surroundWithBrackets, toStringsetParentcheckInit, checkInit, copyToImpl, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization, processPropertyChange, setIDaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getChildSupport, getID, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setName, setProperties, setPropertyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetParent, setParentaddObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getProperty, getReferenceIDs, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName, setProperties, setPropertypublic static final java.lang.String TYPE
public static final java.lang.String ASC
public static final java.lang.String DESC
public static final java.lang.String NULLS_FIRST
public static final java.lang.String NULLS_LAST
public OrderByObject()
public OrderByObject(SQLFragment exp)
public OrderByObject(SQLFragment exp, java.lang.String ordering)
public OrderByObject(SQLFragment exp, java.lang.String ordering, java.lang.String nullsOrder)
public java.lang.String getType()
DBObjectgetType in interface DBObjectgetType in class AbstractSQLFragmentpublic java.lang.String getOrder()
null).public void setOrder(java.lang.String order)
null,
OrderByObject.ASC or OrderByObject.DESCpublic java.lang.String getNullOrdering()
public void setNullOrdering(java.lang.String nullOrdering)
public SQLFragment getExpression()
public void setExpression(SQLFragment exp)
public java.lang.String getSQLText()