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 |
COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, NEWLINE, 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, argsToString, getStartOffset, getTextOrNull, getTextOrNull, setStartOffset, surroundWithBrackets, surroundWithBrackets, toString
setParent
checkInit, checkInit, copyToImpl, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization
addObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, fireObjectUpdated, firePropertyChanged, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, setProperty
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getParent, setParent
addObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getReferenceIDs, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName
getProperty, getProperty, setProperties, setProperty
public 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()
DBObject
getType
in interface DBObject
getType
in class AbstractSQLFragment
public java.lang.String getOrder()
null
).public void setOrder(java.lang.String order)
null
,
OrderByObject.ASC
or OrderByObject.DESC
public java.lang.String getNullOrdering()
public void setNullOrdering(java.lang.String nullOrdering)
public SQLFragment getExpression()
public void setExpression(SQLFragment exp)
public java.lang.String getSQLText()