Skip navigation links 
 
oracle.javatools.db.sql
Class Operation
java.lang.Object
  
oracle.javatools.db.AbstractDBObject
      
oracle.javatools.db.AbstractChildDBObject
          
oracle.javatools.db.sql.AbstractSQLFragment
              
oracle.javatools.db.sql.Operation
- All Implemented Interfaces:
 
- ChildDBObject, DBObject, SQLFragment, Copyable, DynamicPropertySet
 
- Direct Known Subclasses:
 
- ArithmeticOperation, Comparison, DataMiningFunction, ExpressionList, Function, FunctionUsage, GroupByExpression, SetOperation, WhereObject
 
- 
public abstract class Operation
 
- extends AbstractSQLFragment
 
Abstract class for operations. Consists of a set of arguments and an operation text. The operator can be of a "function format"
OPERATION(arg1, arg2, arg3 ...)
or not
arg1 OPERATION arg2 OPERATION arg3 ...
- Since:
 
- 10.1.3
 
 
 
  
 
 
 
 
  
 
  
 
 
 
 
| Methods inherited from class oracle.javatools.db.AbstractDBObject | 
changeParent, compareToImpl, copyObject, copyTo, copyTo, copyTo, copyTo, equals, findOwnedObject, findOwnedObject, findOwnedObject, getChildSupport, getID, getName, getOwnedObjects, getOwnedObjects, getOwnedObjectsImpl, getProperties, getProperty, getReferenceIDs, getReferenceIDsImpl, hashCode, includeOwnedObject, includesType, includesType, removeThisAsParent, replaceReferenceIDs, setID, setName, setProperties | 
 
| Methods inherited from class java.lang.Object | 
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
 
 
| Methods inherited from interface oracle.javatools.db.DBObject | 
copyTo, copyTo, copyTo, findOwnedObject, findOwnedObject, getID, getName, getOwnedObjects, getOwnedObjects, getReferenceIDs, replaceReferenceIDs, setID, setName | 
 
 
 
Operation
public Operation()
Operation
public Operation(SQLFragment[] args)
setFunctionFormat
protected void setFunctionFormat(boolean boo)
- Sets whether this operation is formatted like a function. i.e.
true - OPERATION(arg1, arg2)
false - arg1 OPERATION arg2 OPERATION arg3 
setCommutative
protected void setCommutative(boolean boo)
- Sets whether the operation is commutative. If it isn't, then brackets are used to surround child fragments that are of the same operation type.
 
getArguments
public SQLFragment[] getArguments()
- Returns the arguments stored in this function.
 
setArguments
public void setArguments(SQLFragment[] arguments)
- Sets the arguments for this function.
 
addArgument
public void addArgument(SQLFragment expression)
addArgument
public void addArgument(int index,
                        SQLFragment expression)
addArguments
public void addArguments(SQLFragment[] expressions)
removeArgument
public boolean removeArgument(SQLFragment expression)
checkNewSize
protected void checkNewSize(int proposedSize)
- Override for operations that have specific size restrictions. Subclasses should throw an IllegalArgumentException if the proposed new size is illegal.
 
getArgumentCount
public int getArgumentCount()
- Returns the number of arguments stored.
 
getOperatorText
protected abstract java.lang.String getOperatorText()
checkArgument
protected void checkArgument(java.util.List<SQLFragment> existing,
                             SQLFragment add)
                      throws java.lang.IllegalArgumentException
- If this returns true the Operation checks that the type of all arguments is the same.
 
- 
- Throws:
 
java.lang.IllegalArgumentException 
 
setSeparator
protected void setSeparator(java.lang.String separator)
getSeparator
protected java.lang.String getSeparator()
getDistinctText
protected java.lang.String getDistinctText()
- Override this for aggregate functions which may take a DISTINCT/UNIQUE/ALL qualifier.
 
getSQLText
public java.lang.String getSQLText()
- Returns the complete SQL representation for this Function fragment.
 
- 
- Returns:
 
- a string representing the SQL text for this object.
 
 
equalsImpl
protected boolean equalsImpl(AbstractDBObject other)
- Description copied from class: 
AbstractDBObject 
- Equals implementation for testing equality with another AbstractDBObject. Override this method (with exact signature) to customise the equality comparison.
 
- 
- Overrides:
 
equalsImpl in class AbstractDBObject 
 
copyToImpl
protected void copyToImpl(AbstractDBObject target,
                          DBObject copyParent,
                          IDPolicy idPolicy)
- Description copied from class: 
AbstractDBObject 
- Implementation method for making a copy of this object. To add custom copyTo logic, a subclass must override this method (exactly), and must call back to the super implementation.
 
- 
- Overrides:
 
copyToImpl in class AbstractChildDBObject 
 
- 
- Parameters:
 
target - the copy being created of this object 
copyParent - if this object is being copied underneath a parent, this parameter is the copy of the parent of this object, which will therefore need to be the parent of the copy of this object. 
idPolicy - the policy for copying the object's ID. 
 
Skip navigation links 
 
Copyright © 1997, 2011, Oracle. All rights reserved.