public class Comparison extends Operation
Modifier and Type | Class and Description |
---|---|
static class |
Comparison.Comparator
Valid comparators for SQL.
|
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, NEWLINE, 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, setSeparator
appendToBuffer, argsToString, getStartOffset, getTextOrNull, getTextOrNull, getType, setStartOffset, surroundWithBrackets, surroundWithBrackets, toString
setParent
checkInit, checkInit, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitialization
addObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, 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
getStartOffset
getParent, setParent
addObjectListener, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getReferenceIDs, getType, hashCode, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setName
getProperty, getProperty, setProperties, setProperty
public 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 Operation
public 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)
Operation
checkNewSize
in class Operation
public java.lang.String getSQLText()
Operation
getSQLText
in interface SQLFragment
getSQLText
in class Operation
public void addArgument(int index, SQLFragment expression)
addArgument
in class Operation
public void addArgument(SQLFragment expression)
addArgument
in class Operation
public void addArguments(SQLFragment[] expressions)
addArguments
in class Operation
public int getArgumentCount()
Operation
getArgumentCount
in class Operation
public void setArguments(SQLFragment[] arguments)
Operation
setArguments
in class Operation
public boolean removeArgument(SQLFragment expression)
removeArgument
in class Operation
public SQLFragment[] getArguments()
Operation
getArguments
in class Operation
public static Comparison.Comparator getComparator(java.lang.String sql)