public class Comparison extends Operation
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport| Modifier and Type | Field and Description |
|---|---|
static int |
EQUAL
Equal
|
static int |
EQUAL_ALL |
static int |
EQUAL_ANY |
static int |
EQUAL_SOME |
static int |
EXISTS
Exists
|
static int |
GREATER
Greater Than
|
static int |
GREATER_EQUAL
Greater Than Or Equal To
|
static int |
GREATER_THAN_ALL |
static int |
GREATER_THAN_ANY |
static int |
GREATER_THAN_OR_EQUAL_ALL |
static int |
GREATER_THAN_OR_EQUAL_ANY |
static int |
GREATER_THAN_OR_EQUAL_SOME |
static int |
GREATER_THAN_SOME |
static int |
INTERSECT |
static int |
LESS
Less Than
|
static int |
LESS_EQUAL
Less Than Or Equal To
|
static int |
LESS_THAN_ALL |
static int |
LESS_THAN_ANY |
static int |
LESS_THAN_OR_EQUAL_ALL |
static int |
LESS_THAN_OR_EQUAL_ANY |
static int |
LESS_THAN_OR_EQUAL_SOME |
static int |
LESS_THAN_SOME |
static int |
LIKE
Like
|
static int |
MINUS |
static int |
NOT_EQUAL
Not Equal
|
static int |
NOT_EQUAL_ALL |
static int |
NOT_EQUAL_ANY |
static int |
NOT_EQUAL_SOME |
static int |
NOT_EXISTS
Not Exists
|
static int |
NOT_IN |
static int |
NOT_LIKE
Not Like
|
static int |
NOT_NULL
Is Not Null
|
static int |
NULL
Is Null
|
static int |
REGEXP_LIKE
regexp_like
|
static int |
UNION |
static int |
UNION_ALL |
COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, NEWLINE, SPACE| Constructor and Description |
|---|
Comparison()
Constructs a new, empty, comparison object.
|
Comparison(int comparator, SQLFragment[] argsL)
Constructs a new comparison fragment for regexp_like, which has function format.
|
Comparison(SQLFragment left, int comparator)
Left argument only constructor - used for IS NULL, IS NOT NULL, EXISTS and NOT EXISTS.
|
Comparison(SQLFragment left, int 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.
|
int |
getComparator()
Returns the comparator for this comparison fragment.
|
static java.lang.String |
getComparatorText(int op)
Returns the comparator text for the given int.
|
static int |
getComparisonOperation(java.lang.String operator)
Returns the comparisson code for the given text.
|
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.
|
static boolean |
isComparator(int op) |
boolean |
removeArgument(SQLFragment expression) |
void |
setArguments(SQLFragment[] arguments)
Sets the arguments for this function.
|
void |
setComparator(int 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, getDistinctText, getSeparator, setCommutative, setFunctionFormat, setSeparatorappendToBuffer, argsToString, getStartOffset, getTextOrNull, getTextOrNull, getType, setStartOffset, surroundWithBrackets, surroundWithBrackets, toStringsetParentcheckInit, checkInit, fireObjectUpdated, getOwnedObjectsImpl, getProperties, getReferenceIDsImpl, needsInitializationaddObjectListener, addObjectListener, addObjectListener, changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, findOwnedObject, findParent, firePropertyChanged, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getParent, getProperty, getProperty, getReferenceIDs, hashCode, includeOwnedObject, includesType, includesType, removeObjectListener, removeObjectListener, removeObjectListener, removeOwnedObject, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, setPropertyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetParent, setParentaddObjectListener, copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getReferenceIDs, removeObjectListener, removeOwnedObject, replaceReferenceIDs, setID, setNamegetProperty, getProperty, setProperties, setPropertypublic static final int GREATER
public static final int LESS
public static final int GREATER_EQUAL
public static final int LESS_EQUAL
public static final int EQUAL
public static final int NOT_EQUAL
public static final int NULL
public static final int NOT_NULL
public static final int LIKE
public static final int NOT_LIKE
public static final int REGEXP_LIKE
public static final int EXISTS
public static final int NOT_EXISTS
public static final int EQUAL_ANY
public static final int NOT_EQUAL_ANY
public static final int GREATER_THAN_ANY
public static final int GREATER_THAN_OR_EQUAL_ANY
public static final int LESS_THAN_ANY
public static final int LESS_THAN_OR_EQUAL_ANY
public static final int EQUAL_SOME
public static final int NOT_EQUAL_SOME
public static final int GREATER_THAN_SOME
public static final int GREATER_THAN_OR_EQUAL_SOME
public static final int LESS_THAN_SOME
public static final int LESS_THAN_OR_EQUAL_SOME
public static final int EQUAL_ALL
public static final int NOT_EQUAL_ALL
public static final int GREATER_THAN_ALL
public static final int GREATER_THAN_OR_EQUAL_ALL
public static final int LESS_THAN_ALL
public static final int LESS_THAN_OR_EQUAL_ALL
public static final int NOT_IN
public static final int INTERSECT
public static final int UNION
public static final int MINUS
public static final int UNION_ALL
public Comparison()
public Comparison(SQLFragment left, int comparator)
public Comparison(int comparator,
SQLFragment[] argsL)
public Comparison(SQLFragment left, int comparator, SQLFragment right)
public int getComparator()
public java.lang.String getOperatorText()
getOperatorText in class Operationpublic void setComparator(int 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 Operation
public 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 boolean isComparator(int op)
public static java.lang.String getComparatorText(int op)
public static int getComparisonOperation(java.lang.String operator)