SELECT
clause and a FROM clause. The other clauses are optional.
BNF: select_statement ::= select_clause from_clause [where_clause] [groupby_clause] [having_clause] [orderby_clause]
FromClauseStateObject, GroupByClauseStateObject, HavingClauseStateObject, OrderByClauseStateObject, SelectClauseStateObject, WhereClauseStateObject, SelectStatement
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ORDER_BY_CLAUSE_PROPERTY
Notify the state object representing the |
| private OrderByClauseStateObject | orderByClause
The state object representing the |
| Access | Constructor and Description |
|---|---|
| public | SelectStatementStateObject(JPQLQueryStateObject
The parent of this state object, which cannot be parent)nullCreates 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 OrderByClauseStateObject | Returns: The state object representing theORDER BY clauseAdds the |
| public OrderByClauseStateObject | Returns: TheOrderByClauseStateObjectThe fragment of the JPQL to parse that represents the ordering items, the
fragment cannot start with jpqlFragment)ORDER BYAdds the |
| public void | addSelectItem(StateObject
The stateObject)StateObject representing a select expressionAdds the given |
| public ResultVariableStateObject | Returns: The newly createdResultVariableStateObjectThe stateObject, String StateObject representing the select expressionThe result variable identifying the select expression resultVariable)Adds the given |
| public StateObject | Returns: TheStateObject encapsulating the given pathThe select expression to parse as a select item path)Adds the given path as a select item, which can either be an identification variable or a state-field path expression. |
| public ResultVariableStateObject | Returns: The newly createdResultVariableStateObjectThe select expression to parse as a select item jpqlFragment, String The result variable identifying the select expression resultVariable)Adds the given expression as a select item. |
| public ResultVariableStateObject | Returns: The newly createdResultVariableStateObjectThe stateObject, String StateObject representing the select expressionThe result variable identifying the select expression resultVariable)Adds the given |
| public ResultVariableStateObject | Returns: The newly createdResultVariableStateObjectThe portion of a JPQL query that represents a select expression jpqlFragment, String The result variable identifying the select expression resultVariable)Adds the given expression as a select item. |
| protected AbstractFromClauseStateObject | buildFromClause()
Implements abstract org. FROM clause.
|
| protected AbstractSelectClauseStateObject | buildSelectClause()
Implements abstract org. SELECT clause.
|
| public SelectStatement | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public FromClauseStateObject | getFromClause()
Overrides org. FROM clause.
|
| public OrderByClauseStateObject | Returns: Either the actual state object representing theORDER BY clause or
null if it's not presentReturns the state object representing the |
| public JPQLQueryStateObject | getParent()
Overrides org. Implements org. StateObject.
|
| public ISelectExpressionStateObjectBuilder | Returns: A new builder that can be used to quickly create a select expressionCreates and returns a new |
| public SelectClauseStateObject | |
| public boolean | Returns: true if the ORDER BY clause is present;
false otherwiseReturns the state object representing the |
| 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 | |
| public void | setExpression(SelectStatement
The expression)parsed object representing a SELECT
statementKeeps a reference of the |
| private void | |
| public void | |
| protected void | toTextInternal(Appendable
The writer used to print out the string representation writer)Overrides org. StateObject, which should not be used to
define a true string representation of a JPQL query but should be used for
debugging purposes.
|
| ORDER_BY_CLAUSE_PROPERTY | back to summary |
|---|---|
| public static final String ORDER_BY_CLAUSE_PROPERTY Notify the state object representing the | |
| orderByClause | back to summary |
|---|---|
| private OrderByClauseStateObject orderByClause The state object representing the | |
| SelectStatementStateObject | back to summary |
|---|---|
| public SelectStatementStateObject(JPQLQueryStateObject parent) 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
| |
| addOrderByClause | back to summary |
|---|---|
| public OrderByClauseStateObject addOrderByClause() Adds the
| |
| addOrderByClause | back to summary |
|---|---|
| public OrderByClauseStateObject addOrderByClause(String jpqlFragment) Adds the
| |
| addSelectItem | back to summary |
|---|---|
| public void addSelectItem(StateObject stateObject) Adds the given
| |
| addSelectItem | back to summary |
|---|---|
| public ResultVariableStateObject addSelectItem(StateObject stateObject, String resultVariable) Adds the given
| |
| addSelectItem | back to summary |
|---|---|
| public StateObject addSelectItem(String path) Adds the given path as a select item, which can either be an identification variable or a state-field path expression.
| |
| addSelectItem | back to summary |
|---|---|
| public ResultVariableStateObject addSelectItem(String jpqlFragment, String resultVariable) Adds the given expression as a select item.
| |
| addSelectItemAs | back to summary |
|---|---|
| public ResultVariableStateObject addSelectItemAs(StateObject stateObject, String resultVariable) Adds the given
| |
| addSelectItemAs | back to summary |
|---|---|
| public ResultVariableStateObject addSelectItemAs(String jpqlFragment, String resultVariable) Adds the given expression as a select item.
| |
| buildFromClause | back to summary |
|---|---|
| protected AbstractFromClauseStateObject buildFromClause() Implements abstract org. Creates the state object representing the
| |
| buildSelectClause | back to summary |
|---|---|
| protected AbstractSelectClauseStateObject buildSelectClause() Implements abstract org. Creates the state object representing the
| |
| getExpression | back to summary |
|---|---|
| public SelectStatement getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getFromClause | back to summary |
|---|---|
| public FromClauseStateObject getFromClause() Overrides org. Doc from org. Returns the state object representing the
| |
| getOrderByClause | back to summary |
|---|---|
| public OrderByClauseStateObject getOrderByClause() Returns the state object representing the
| |
| getParent | back to summary |
|---|---|
| public JPQLQueryStateObject getParent() Overrides org. Implements org. Doc from org. Returns the parent of this
| |
| getSelectBuilder | back to summary |
|---|---|
| public ISelectExpressionStateObjectBuilder getSelectBuilder() Creates and returns a new
| |
| getSelectClause | back to summary |
|---|---|
| public SelectClauseStateObject getSelectClause() Returns the state object representing the
| |
| hasOrderByClause | back to summary |
|---|---|
| public boolean hasOrderByClause() Returns the state object representing the
| |
| isEquivalent | back to summary |
|---|---|
| public boolean isEquivalent(StateObject stateObject) Overrides org. Implements org. Doc from org. Determines whether the given
| |
| removeOrderByClause | back to summary |
|---|---|
| public void removeOrderByClause() Removes the | |
| setExpression | back to summary |
|---|---|
| public void setExpression(SelectStatement expression) Keeps a reference of the
| |
| setOrderByClause | back to summary |
|---|---|
| private void setOrderByClause(OrderByClauseStateObject orderByClause) | |
| toggleOrderByClause | back to summary |
|---|---|
| public void toggleOrderByClause() Either adds or removes the | |
| toTextInternal | back to summary |
|---|---|
| protected void toTextInternal(Appendable writer) throws IOException Overrides org. Doc from org. Prints out a string representation of this
| |