public abstract class Operation extends AbstractSQLFragment implements SQLFragmentWithDatatype
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupportAS, COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, LEFT_PAREN, NEWLINE, RIGHT_PAREN, SPACE| Constructor and Description |
|---|
Operation() |
Operation(SQLFragment[] args) |
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(int index,
SQLFragment expression) |
void |
addArgument(SQLFragment expression) |
void |
addArguments(SQLFragment[] expressions) |
protected void |
checkArgument(java.util.List<SQLFragment> existing,
SQLFragment add)
If this returns true the Operation checks that the type of all arguments
is the same.
|
protected void |
checkNewSize(int proposedSize)
Override for operations that have specific size restrictions.
|
protected void |
copyToImpl(AbstractDBObject target,
DBObject copyParent,
IDPolicy idPolicy)
Implementation method for making a copy of this object.
|
protected boolean |
equalsImpl(AbstractDBObject other)
Equals implementation for testing equality with another AbstractDBObject.
|
int |
getArgumentCount()
Returns the number of arguments stored.
|
SQLFragment[] |
getArguments()
Returns the arguments stored in this function.
|
DBObjectID |
getDataTypeID()
Get the ID of the DataType of the SQLFragment.
|
protected java.lang.String |
getDistinctText()
Override this for aggregate functions which may take
a DISTINCT/UNIQUE/ALL qualifier.
|
protected abstract java.lang.String |
getOperatorText() |
protected java.lang.String |
getSeparator() |
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.
|
protected void |
setCommutative(boolean boo)
Sets whether the operation is commutative.
|
protected void |
setFunctionFormat(boolean boo)
Sets whether this operation is formatted like a function.
|
protected void |
setSeparator(java.lang.String separator) |
appendToBuffer, 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 Operation()
public Operation(SQLFragment[] args)
protected void setFunctionFormat(boolean boo)
true - OPERATION(arg1, arg2)false - arg1 OPERATION arg2 OPERATION arg3protected void setCommutative(boolean boo)
public SQLFragment[] getArguments()
public void setArguments(SQLFragment[] arguments)
public void addArgument(SQLFragment expression)
public void addArgument(int index,
SQLFragment expression)
public void addArguments(SQLFragment[] expressions)
public boolean removeArgument(SQLFragment expression)
public DBObjectID getDataTypeID()
SQLFragmentWithDatatypegetDataTypeID in interface SQLFragmentWithDatatypeprotected void checkNewSize(int proposedSize)
public int getArgumentCount()
protected abstract java.lang.String getOperatorText()
protected void checkArgument(java.util.List<SQLFragment> existing, SQLFragment add) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionprotected void setSeparator(java.lang.String separator)
protected java.lang.String getSeparator()
protected java.lang.String getDistinctText()
public java.lang.String getSQLText()
getSQLText in interface SQLFragmentprotected boolean equalsImpl(AbstractDBObject other)
AbstractDBObjectequalsImpl in class AbstractDBObjectprotected void copyToImpl(AbstractDBObject target, DBObject copyParent, IDPolicy idPolicy)
AbstractDBObjectcopyToImpl in class AbstractBuildableObjecttarget - the copy being created of this objectcopyParent - 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.