|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.javatools.db.AbstractDBObject oracle.javatools.db.AbstractChildDBObject oracle.javatools.db.sql.AbstractSQLFragment oracle.javatools.db.sql.Operation oracle.javatools.db.sql.Comparison
public class Comparison
Subclass of Operation for comparisons. Operation only has two arguments - a
left and right expression.
By default a Comparison object is EQUAL
Nested Class Summary |
---|
Nested classes/interfaces inherited from class oracle.javatools.db.AbstractDBObject |
---|
AbstractDBObject.ChildSupport |
Field Summary | |
---|---|
static int |
EQUAL
Equal |
static int |
EXISTS
Exists |
static int |
GREATER
Greater Than |
static int |
GREATER_EQUAL
Greater Than Or Equal To |
static int |
LESS
Less Than |
static int |
LESS_EQUAL
Less Than Or Equal To |
static int |
LIKE
Like |
static int |
NOT_EQUAL
Not Equal |
static int |
NOT_EXISTS
Not Exists |
static int |
NOT_LIKE
Not Like |
static int |
NOT_NULL
Is Not Null |
static int |
NULL
Is Null |
Fields inherited from class oracle.javatools.db.sql.AbstractSQLFragment |
---|
DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, NEWLINE, SPACE |
Fields inherited from interface oracle.javatools.db.sql.SQLFragment |
---|
CONNECTBY, FROM, GROUPBY, HAVING, NOCYCLE, ORDERBY, SELECT, STARTWITH, TYPE, WHERE |
Fields inherited from interface oracle.javatools.db.DBObject |
---|
COMMENT |
Constructor Summary | |
---|---|
Comparison()
Constructs a new, empty, comparison object. |
|
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. |
Method Summary | |
---|---|
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. |
DBObject |
copyTo(DBObject target,
DBObject copyParent,
IDPolicy idPolicy)
Internal copy method used by the API to perform copy operations. |
protected void |
copyToImpl(Comparison target,
DBObject copyParent,
IDPolicy idPolicy)
|
boolean |
equals(java.lang.Object obj)
|
protected boolean |
equalsImpl(Comparison other)
|
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. |
SQLFragment |
getLeftExpression()
Gets the left expression. |
java.lang.String |
getOperatorText()
Returns the text for the comparator for this comparison fragment. |
protected void |
getOwnedObjectsImpl(java.util.Collection<DBObject> objs,
java.lang.String... types)
Used by all the final children methods. |
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 left)
Sets the left expression. |
void |
setRightExpression(SQLFragment right)
Sets the right expression. |
Methods inherited from class oracle.javatools.db.sql.Operation |
---|
checkArgument, copyToImpl, equalsImpl, getDistinctText, getSeparator, setCommutative, setFunctionFormat, setSeparator |
Methods inherited from class oracle.javatools.db.sql.AbstractSQLFragment |
---|
appendToBuffer, argsToString, getTextOrNull, getTextOrNull, getType, setParent, surroundWithBrackets, surroundWithBrackets, toString |
Methods inherited from class oracle.javatools.db.AbstractChildDBObject |
---|
copyToImpl, findParent, getParent |
Methods inherited from class oracle.javatools.db.AbstractDBObject |
---|
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyToImpl, equalsImpl, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getProperties, getProperty, getProperty, getReferenceIDs, getReferenceIDsImpl, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface oracle.javatools.db.ChildDBObject |
---|
getParent |
Methods inherited from interface oracle.javatools.db.DBObject |
---|
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, replaceReferenceIDs, setID, setName |
Methods inherited from interface oracle.javatools.util.DynamicPropertySet |
---|
getProperties, getProperty, getProperty, setProperties, setProperty |
Field Detail |
---|
public 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 EXISTS
public static final int NOT_EXISTS
Constructor Detail |
---|
public Comparison()
public Comparison(SQLFragment left, int comparator)
public Comparison(SQLFragment left, int comparator, SQLFragment right)
Method Detail |
---|
public int getComparator()
public java.lang.String getOperatorText()
getOperatorText
in class Operation
public void setComparator(int comparator)
public SQLFragment getLeftExpression()
public void setLeftExpression(SQLFragment left)
public SQLFragment getRightExpression()
public void setRightExpression(SQLFragment right)
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 boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
protected boolean equalsImpl(Comparison other)
public DBObject copyTo(DBObject target, DBObject copyParent, IDPolicy idPolicy)
AbstractDBObject
This method does not fix internal reference ids on copy. That is done by
the calling DBObject.copyTo(DBObject, IDPolicy)
method.
copyTo
in class AbstractDBObject
DBObject.copyTo(java.lang.Object)
,
DBObject.copyTo(DBObject, boolean)
,
AbstractDBObject.copyToImpl(oracle.javatools.db.AbstractDBObject, oracle.javatools.db.DBObject, oracle.javatools.db.IDPolicy)
protected void copyToImpl(Comparison target, DBObject copyParent, IDPolicy idPolicy)
protected void getOwnedObjectsImpl(java.util.Collection<DBObject> objs, java.lang.String... types)
AbstractDBObject
includesType
to check the types vararg.
getOwnedObjectsImpl
in class AbstractDBObject
objs
- a Collection of the apppropriate children.types
- a vararg of the type(s) to search forAbstractDBObject.includesType(java.lang.String, java.lang.String...)
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 boolean isComparator(int op)
public static java.lang.String getComparatorText(int op)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1) E13403-04 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |