BNF: arithmetic_factor ::= [{+|-}] arithmetic_primary
ArithmeticFactor
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ARITHMETIC_SIGN_PROPERTY
Notifies the arithmetic sign property has changed. |
| private boolean | plusSign
|
| public static final String | STATE_OBJECT_PROPERTY
Notifies the state object property has changed. |
| private StateObject | stateObject
The |
| Access | Constructor and Description |
|---|---|
| public | ArithmeticFactorStateObject(StateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| public | ArithmeticFactorStateObject(StateObject
The parent of this state object, which cannot be parent, boolean plusSign, StateObject nullThe stateObject)StateObject that represents the arithmetic primary expressionCreates a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(StateObjectVisitor
The visitor)visitor to visit this objectImplements org. StateObject by the given visitor.
|
| protected void | addChildren(List<StateObject>
The list used to store the children children)Overrides org. StateObject to the given list.
|
| public void | |
| public void | |
| public String | Returns: The single character value of the arithmetic sign: '+' or '-'Returns the arithmetic sign this expression is actually representing. |
| public ArithmeticFactor | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public StateObject | Returns: TheStateObject that represents the arithmetic primary expression or
null if none was specifiedReturns the |
| public boolean | Returns: true if the arithmetic sign is the minus sign; false if it
is the plus signDetermines whether the arithmetic sign is the minus sign. |
| public boolean | Returns: true if the arithmetic sign is the plus sign; false if it
is the minus signDetermines whether the arithmetic sign is the plus sign. |
| public boolean | Returns: true if there is the arithmetic primary expression exists; false
otherwiseDetermines whether an |
| public boolean | isEquivalent(StateObject
The stateObject)StateObject to compare its content to this oneOverrides org. Implements org. StateObject is equivalent to this one, i.e. the
information of both StateObject is the same.
|
| public void | parse(String
A portion of a query that will be parsed and the jpqlFragment)StateObject that
was created will become the new arithmetic primary of this ArithmeticFactorStateObjectParses the given JPQL fragment to become the new arithmetic primary. |
| public void | setArithmeticSign(boolean
The single character value of the arithmetic sign: '+' ( plusSign)true) or
'-' (false)Sets the arithmetic sign this expression is actually representing. |
| public void | setExpression(ArithmeticFactor
The expression)parsed object representing an arithmetic
factor expressionKeeps a reference of the |
| public void | setStateObject(StateObject
The stateObject)StateObject that represents the arithmetic primary expression
or null if none was specifiedReturns the |
| public void | |
| protected void | toTextInternal(Appendable
The writer used to print out the string representation writer)Implements abstract org. StateObject, which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes.
|
| ARITHMETIC_SIGN_PROPERTY | back to summary |
|---|---|
| public static final String ARITHMETIC_SIGN_PROPERTY Notifies the arithmetic sign property has changed. | |
| plusSign | back to summary |
|---|---|
| private boolean plusSign
| |
| STATE_OBJECT_PROPERTY | back to summary |
|---|---|
| public static final String STATE_OBJECT_PROPERTY Notifies the state object property has changed. | |
| stateObject | back to summary |
|---|---|
| private StateObject stateObject The | |
| ArithmeticFactorStateObject | back to summary |
|---|---|
| public ArithmeticFactorStateObject(StateObject parent) Creates a new
| |
| ArithmeticFactorStateObject | back to summary |
|---|---|
| public ArithmeticFactorStateObject(StateObject parent, boolean plusSign, StateObject stateObject) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| addChildren | back to summary |
|---|---|
| protected void addChildren(List<StateObject> children) Overrides org. Doc from org. Adds the children of this
| |
| addMinus | back to summary |
|---|---|
| public void addMinus() Makes sure the | |
| addPlus | back to summary |
|---|---|
| public void addPlus() Makes sure the | |
| getArithmeticSign | back to summary |
|---|---|
| public String getArithmeticSign() Returns the arithmetic sign this expression is actually representing.
| |
| getExpression | back to summary |
|---|---|
| public ArithmeticFactor getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getStateObject | back to summary |
|---|---|
| public StateObject getStateObject() Returns the
| |
| hasMinusSign | back to summary |
|---|---|
| public boolean hasMinusSign() Determines whether the arithmetic sign is the minus sign.
| |
| hasPlusSign | back to summary |
|---|---|
| public boolean hasPlusSign() Determines whether the arithmetic sign is the plus sign.
| |
| hasStateObject | back to summary |
|---|---|
| public boolean hasStateObject() Determines whether an
| |
| isEquivalent | back to summary |
|---|---|
| public boolean isEquivalent(StateObject stateObject) Overrides org. Implements org. Doc from org. Determines whether the given
| |
| parse | back to summary |
|---|---|
| public void parse(String jpqlFragment) Parses the given JPQL fragment to become the new arithmetic primary.
| |
| setArithmeticSign | back to summary |
|---|---|
| public void setArithmeticSign(boolean plusSign) Sets the arithmetic sign this expression is actually representing.
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(ArithmeticFactor expression) Keeps a reference of the
| |
| setStateObject | back to summary |
|---|---|
| public void setStateObject(StateObject stateObject) Returns the
| |
| toggleArithmeticSign | back to summary |
|---|---|
| public void toggleArithmeticSign() Toggles the arithmetic sign, plus becomes minus and vice versa. | |
| toTextInternal | back to summary |
|---|---|
| protected void toTextInternal(Appendable writer) throws IOException Implements abstract org. Doc from org. Prints out a string representation of this
| |