public class ArithmeticOperation extends Operation
Modifier and Type | Class and Description |
---|---|
static class |
ArithmeticOperation.ArithmeticOperator
Valid arithmetic operators.
|
AbstractDBObject.ChildSupport, AbstractDBObject.ListenerSupport
COMMA, DEFAULT_SEPARATOR, EMPTY, EMPTY_ARRAY, INDENT, NEWLINE, SPACE
Constructor and Description |
---|
ArithmeticOperation() |
ArithmeticOperation(ArithmeticOperation.ArithmeticOperator operator,
SQLFragment[] args) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
equalsImpl(AbstractDBObject target)
Equals implementation for testing equality with another AbstractDBObject.
|
static ArithmeticOperation.ArithmeticOperator |
getArithmeticOperator(java.lang.String sql,
int operandCount)
Gets the ArithmeticOperator for a given piece of sql that is exepcted
to be an arithmetic operator.
|
DBObjectID |
getDataTypeID()
Get the ID of the DataType of the SQLFragment.
|
ArithmeticOperation.ArithmeticOperator |
getOperator() |
java.lang.String |
getOperatorText() |
java.lang.String |
getSQLText()
Returns the complete SQL representation for this Function fragment.
|
void |
setOperator(ArithmeticOperation.ArithmeticOperator operator) |
addArgument, addArgument, addArguments, checkArgument, checkNewSize, copyToImpl, getArgumentCount, getArguments, getDistinctText, getSeparator, removeArgument, setArguments, 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 ArithmeticOperation()
public ArithmeticOperation(ArithmeticOperation.ArithmeticOperator operator, SQLFragment[] args)
public ArithmeticOperation.ArithmeticOperator getOperator()
public void setOperator(ArithmeticOperation.ArithmeticOperator operator)
public java.lang.String getSQLText()
getSQLText
in interface SQLFragment
getSQLText
in class Operation
public java.lang.String getOperatorText()
getOperatorText
in class Operation
protected boolean equalsImpl(AbstractDBObject target)
AbstractDBObject
equalsImpl
in class Operation
public DBObjectID getDataTypeID()
SQLFragmentWithDatatype
getDataTypeID
in interface SQLFragmentWithDatatype
getDataTypeID
in class Operation
public static ArithmeticOperation.ArithmeticOperator getArithmeticOperator(java.lang.String sql, int operandCount)
sql
- the sql to inspectoperandCount
- the number of operands in the sql that the operator
has.