public class Comparison extends Operation
| Modifier and Type | Class and Description |
|---|---|
static class |
Comparison.Comparator
Valid comparators for SQL.
|
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupportAS, COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, LEFT_PAREN, NEWLINE, RIGHT_PAREN, SPACE| Constructor and Description |
|---|
Comparison()
Constructs a new, empty, comparison object.
|
Comparison(Comparison.Comparator comparator,
SQLFragment[] argsL)
Constructs a new comparison fragment for regexp_like, which has
function format.
|
Comparison(SQLFragment left,
Comparison.Comparator comparator)
Left argument only constructor - used for IS NULL, IS NOT NULL, EXISTS
and NOT EXISTS.
|
Comparison(SQLFragment left,
Comparison.Comparator comparator,
SQLFragment right)
Constructs a new comparison fragment with the given expressions and
comparator.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(int index,
SQLFragment expression) |
void |
addArgument(SQLFragment expression) |
void |
addArguments(SQLFragment[] expressions) |
protected void |
checkNewSize(int proposedSize)
Override for operations that have specific size restrictions.
|
int |
getArgumentCount()
Returns the number of arguments stored.
|
SQLFragment[] |
getArguments()
Returns the arguments stored in this function.
|
Comparison.Comparator |
getComparator()
Returns the comparator for this comparison fragment.
|
static Comparison.Comparator |
getComparator(java.lang.String sql) |
SQLFragment |
getLeftExpression()
Gets the left expression.
|
java.lang.String |
getOperatorText()
Returns the text for the comparator for this comparison fragment.
|
boolean |
getPriorOnLeft()
Has the left expression got a PRIOR operator
|
boolean |
getPriorOnRight()
Has the right expression got a PRIOR operator
|
SQLFragment |
getRightExpression()
Gets the right expression.
|
java.lang.String |
getSQLText()
Returns the complete SQL representation for this Function fragment.
|
boolean |
removeArgument(SQLFragment expression) |
void |
setArguments(SQLFragment[] arguments)
Sets the arguments for this function.
|
void |
setComparator(Comparison.Comparator comparator)
Sets the comparator for this comparison object.
|
void |
setLeftExpression(SQLFragment leftExpression)
Sets the left expression.
|
void |
setPriorOnLeft(boolean priorOnLeft)
Set whether the left expression has a PRIOR operator
|
void |
setPriorOnRight(boolean priorOnRight)
Set whether the right expression has a PRIOR operator
|
void |
setRightExpression(SQLFragment rightExpression)
Sets the right expression.
|
checkArgument, copyToImpl, equalsImpl, getDataTypeID, getDistinctText, getSeparator, setCommutative, setFunctionFormat, setSeparatorappendToBuffer, appendToBuffer, argsToString, getName, getStartOffset, getTextOrNull, getTextOrNull, getType, setStartOffset, surroundWithBrackets, surroundWithBrackets, toStringsetParentcheckInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization, processPropertyChange, setIDaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, 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, waitgetStartOffsetgetParent, setParentaddObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getProperty, getReferenceIDs, getType, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName, setProperties, setPropertypublic Comparison()
public Comparison(SQLFragment left, Comparison.Comparator comparator)
public Comparison(Comparison.Comparator comparator, SQLFragment[] argsL)
public Comparison(SQLFragment left, Comparison.Comparator comparator, SQLFragment right)
public Comparison.Comparator getComparator()
public java.lang.String getOperatorText()
getOperatorText in class Operationpublic void setComparator(Comparison.Comparator comparator)
public SQLFragment getLeftExpression()
public void setLeftExpression(SQLFragment leftExpression)
public SQLFragment getRightExpression()
public void setRightExpression(SQLFragment rightExpression)
public void setPriorOnLeft(boolean priorOnLeft)
public boolean getPriorOnLeft()
public void setPriorOnRight(boolean priorOnRight)
public boolean getPriorOnRight()
protected void checkNewSize(int proposedSize)
OperationcheckNewSize in class Operationpublic java.lang.String getSQLText()
OperationgetSQLText in interface SQLFragmentgetSQLText in class Operationpublic void addArgument(int index,
SQLFragment expression)
addArgument in class Operationpublic void addArgument(SQLFragment expression)
addArgument in class Operationpublic void addArguments(SQLFragment[] expressions)
addArguments in class Operationpublic int getArgumentCount()
OperationgetArgumentCount in class Operationpublic void setArguments(SQLFragment[] arguments)
OperationsetArguments in class Operationpublic boolean removeArgument(SQLFragment expression)
removeArgument in class Operationpublic SQLFragment[] getArguments()
OperationgetArguments in class Operationpublic static Comparison.Comparator getComparator(java.lang.String sql)