BNF: select_item ::= select_expression [[AS] result_variable]
ResultVariable
| Modifier and Type | Field and Description |
|---|---|
| private boolean | as
Flag used to determine if the |
| public static final String | AS_PROPERTY
Notifies the visibility of the |
| public static final String | RESULT_VARIABLE_PROPERTY
Notifies the result variable property has changed. |
| private IdentificationVariableStateObject | resultVariable
The result variable identifies the select expression, which can be used in the
|
| public static final String | STATE_OBJECT_PROPERTY
Notifies the select state object property has changed. |
| private StateObject | stateObject
The state object representing the select expression that is named with a result variable. |
| Access | Constructor and Description |
|---|---|
| public | ResultVariableStateObject(SelectClauseStateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| public | ResultVariableStateObject(SelectClauseStateObject
The parent of this state object, which cannot be parent, StateObject nullThe stateObject, boolean StateObject representing the select itemDetermines whether the as, String AS identifier is used or notThe variable identifying the select item resultVariable)Creates a new |
| public | ResultVariableStateObject(SelectClauseStateObject
The parent of this state object, which cannot be parent, StateObject nullThe stateObject, String StateObject representing the select itemThe variable identifying the select item resultVariable)Creates 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.
|
| public ResultVariableStateObject | |
| protected void | addChildren(List<StateObject>
The list used to store the children children)Overrides org. StateObject to the given list.
|
| public ResultVariable | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public SelectClauseStateObject | getParent()
Overrides org. Implements org. StateObject.
|
| public String | Returns: The unique identifier declaring the select expressionReturns the result variable identifies the select expression, which can be used in the
|
| public StateObject | Returns: TheStateObject representing a single select expressionReturns the |
| public boolean | Returns: true if the AS identifier is used; false
otherwiseDetermines whether the |
| public boolean | Returns: true if the result variable is defined; false otherwiseDetermines whether the result variable has been defined. |
| public boolean | Returns: true if there the selected expression has been defined; false
if it's missingDetermines whether the select item has been defined. |
| protected void | initialize()
Overrides org. |
| 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
The portion of the query representing a single select expression jpqlFragment)Parses the given JPQL fragment, which represents a single select expression, and creates the
|
| public void | |
| public void | setAs(boolean
true if the AS identifier should be used part;
false otherwiseSets whether the |
| public void | setExpression(ResultVariable
The expression)parsed object representing a result variable
expressionKeeps a reference of the |
| public void | setResultVariable(String
The unique identifier declaring the select expression resultVariable)Sets the result variable that identifies the select expression, which can be used in the
|
| public void | setStateObject(StateObject
The stateObject)StateObject representing a single select expressionSets the |
| public void | toggleAs()
Toggles the visibility of the |
| 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.
|
| as | back to summary |
|---|---|
| private boolean as Flag used to determine if the | |
| AS_PROPERTY | back to summary |
|---|---|
| public static final String AS_PROPERTY Notifies the visibility of the | |
| RESULT_VARIABLE_PROPERTY | back to summary |
|---|---|
| public static final String RESULT_VARIABLE_PROPERTY Notifies the result variable property has changed. | |
| resultVariable | back to summary |
|---|---|
| private IdentificationVariableStateObject resultVariable The result variable identifies the select expression, which can be used in the
| |
| STATE_OBJECT_PROPERTY | back to summary |
|---|---|
| public static final String STATE_OBJECT_PROPERTY Notifies the select state object property has changed. | |
| stateObject | back to summary |
|---|---|
| private StateObject stateObject The state object representing the select expression that is named with a result variable. | |
| ResultVariableStateObject | back to summary |
|---|---|
| public ResultVariableStateObject(SelectClauseStateObject parent) Creates a new
| |
| ResultVariableStateObject | back to summary |
|---|---|
| public ResultVariableStateObject(SelectClauseStateObject parent, StateObject stateObject, boolean as, String resultVariable) Creates a new
| |
| ResultVariableStateObject | back to summary |
|---|---|
| public ResultVariableStateObject(SelectClauseStateObject parent, StateObject stateObject, String resultVariable) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| addAs | back to summary |
|---|---|
| public ResultVariableStateObject addAs() Makes sure the
| |
| addChildren | back to summary |
|---|---|
| protected void addChildren(List<StateObject> children) Overrides org. Doc from org. Adds the children of this
| |
| getExpression | back to summary |
|---|---|
| public ResultVariable getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getParent | back to summary |
|---|---|
| public SelectClauseStateObject getParent() Overrides org. Implements org. Doc from org. Returns the parent of this
| |
| getResultVariable | back to summary |
|---|---|
| public String getResultVariable() Returns the result variable identifies the select expression, which can be used in the
| |
| getStateObject | back to summary |
|---|---|
| public StateObject getStateObject() Returns the
| |
| hasAs | back to summary |
|---|---|
| public boolean hasAs() Determines whether the
| |
| hasResultVariable | back to summary |
|---|---|
| public boolean hasResultVariable() Determines whether the result variable has been defined.
| |
| hasStateObject | back to summary |
|---|---|
| public boolean hasStateObject() Determines whether the select item has been defined.
| |
| initialize | back to summary |
|---|---|
| protected void initialize() Overrides org. Doc from org. Initializes this state object.
| |
| 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, which represents a single select expression, and creates the
| |
| removeAs | back to summary |
|---|---|
| public void removeAs() Makes sure the | |
| setAs | back to summary |
|---|---|
| public void setAs(boolean as) Sets whether the
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(ResultVariable expression) Keeps a reference of the
| |
| setResultVariable | back to summary |
|---|---|
| public void setResultVariable(String resultVariable) Sets the result variable that identifies the select expression, which can be used in the
| |
| setStateObject | back to summary |
|---|---|
| public void setStateObject(StateObject stateObject) Sets the
| |
| toggleAs | back to summary |
|---|---|
| public void toggleAs() Toggles the visibility of the | |
| toTextInternal | back to summary |
|---|---|
| protected void toTextInternal(Appendable writer) throws IOException Implements abstract org. Doc from org. Prints out a string representation of this
| |