StateObject hierarchy that represents a JPQL query. The only
child of this state object is one of the three possible query statements.
DeleteStatementStateObject, SelectStatementStateObject, UpdateStatementStateObject, JPQLExpression
| Modifier and Type | Field and Description |
|---|---|
| private IManagedTypeProvider | provider
The external form of a provider that gives access to the JPA metadata. |
| public static final String | QUERY_STATEMENT_PROPERTY
Notifies the query statement has changed. |
| private IJPQLQueryBuilder | queryBuilder
The builder that can create any |
| private StateObject | queryStatement
One of the possible three statements. |
| Access | Constructor and Description |
|---|---|
| public | JPQLQueryStateObject(IJPQLQueryBuilder
The builder that can create any queryBuilder, IManagedTypeProvider StateObject for any given JPQL
fragment when using a parse methodThe external form of a provider that gives access to the JPA metadata provider)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.
|
| protected void | addChildren(List<StateObject>
The list used to store the children children)Overrides org. StateObject to the given list.
|
| public DeleteStatementStateObject | Returns: The new root object of theDELETE statementChanges the query statement to be a |
| public SelectStatementStateObject | Returns: The new root object of theSELECT statementChanges the query statement to be a |
| public SelectStatementStateObject | Returns: The new root object of theSELECT statementChanges the query statement to be a |
| public SelectStatementStateObject | Returns: The new root object of theSELECT statementThe portion of the query representing the select items, excluding the
jpqlFragment)SELECT identifierChanges the query statement to be a |
| public UpdateStatementStateObject | Returns: The new root object of theUPDTE statementChanges the query statement to be a |
| public UpdateStatementStateObject | Returns: The new root object of theUPDATE statementThe portion of the query representing the select items, excluding the
jpqlFragment)UPDATE identifierChanges the query statement to be a |
| protected StateObject | checkParent(StateObject
The parent of this state object parent)Overrides org. null or not.
|
| public DeclarationStateObject | getDeclaration()
Overrides org. Implements org. |
| public JPQLExpression | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public JPQLGrammar | getGrammar()
Overrides org. Implements org. |
| public IManagedTypeProvider | getManagedTypeProvider()
Overrides org. Implements org. |
| public StateObject | getParent()
Overrides org. Implements org. StateObject.
|
| public IJPQLQueryBuilder | getQueryBuilder()
Overrides org. Implements org. IJPQLQueryBuilder that is responsible to create various part of the StateObject hierarchy.
|
| public StateObject | Returns: The state object representing the query statement, which was created based on the query typeReturns the only child of this state object, which represents one of the three query statement. |
| public JPQLQueryStateObject | getRoot()
Overrides org. Implements org. StateObject hierarchy.
|
| public boolean | Returns: true if there is a query statement defined; false otherwiseDetermines whether a query statement has been defined. |
| protected void | initialize(IJPQLQueryBuilder
The builder that can create any queryBuilder, IManagedTypeProvider StateObject for any given JPQL fragmentThe external form that gives access to the JPA metadata provider)Initializes this |
| 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(CharSequence
The portion of the query to parse jpqlFragment, String The unique identifier of the BNF that determines how to parse the fragment queryBNFId)Parses the given JPQL fragment as this state object's query statement. |
| public void | setExpression(JPQLExpression
The expression)parsed object representing the JPQL queryKeeps a reference of the |
| public void | setQueryStatement(StateObject
The state object representing the query statement, which was created
based on the query type queryStatement)Sets the only child of this state object, which represents one of the three query statement. |
| 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.
|
| provider | back to summary |
|---|---|
| private IManagedTypeProvider provider The external form of a provider that gives access to the JPA metadata. | |
| QUERY_STATEMENT_PROPERTY | back to summary |
|---|---|
| public static final String QUERY_STATEMENT_PROPERTY Notifies the query statement has changed. | |
| queryBuilder | back to summary |
|---|---|
| private IJPQLQueryBuilder queryBuilder The builder that can create any | |
| queryStatement | back to summary |
|---|---|
| private StateObject queryStatement One of the possible three statements. | |
| JPQLQueryStateObject | back to summary |
|---|---|
| public JPQLQueryStateObject(IJPQLQueryBuilder queryBuilder, IManagedTypeProvider provider) 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
| |
| addDeleteStatement | back to summary |
|---|---|
| public DeleteStatementStateObject addDeleteStatement() Changes the query statement to be a
| |
| addDistinctSelectStatement | back to summary |
|---|---|
| public SelectStatementStateObject addDistinctSelectStatement() Changes the query statement to be a
| |
| addSelectStatement | back to summary |
|---|---|
| public SelectStatementStateObject addSelectStatement() Changes the query statement to be a
| |
| addSelectStatement | back to summary |
|---|---|
| public SelectStatementStateObject addSelectStatement(String jpqlFragment) Changes the query statement to be a
| |
| addUpdateStatement | back to summary |
|---|---|
| public UpdateStatementStateObject addUpdateStatement() Changes the query statement to be a
| |
| addUpdateStatement | back to summary |
|---|---|
| public UpdateStatementStateObject addUpdateStatement(String jpqlFragment) Changes the query statement to be a
| |
| checkParent | back to summary |
|---|---|
| protected StateObject checkParent(StateObject parent) Overrides org. Doc from org. Checks whether the given parent is
| |
| getDeclaration | back to summary |
|---|---|
| public DeclarationStateObject getDeclaration() Overrides org. Implements org. Doc from org. Returns the declaration clause which defines the domain of the query by declaring identification variables.
| |
| getExpression | back to summary |
|---|---|
| public JPQLExpression getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getGrammar | back to summary |
|---|---|
| public JPQLGrammar getGrammar() Overrides org. Implements org. Doc from org. Returns the grammar that defines how to parse a JPQL query.
| |
| getManagedTypeProvider | back to summary |
|---|---|
| public IManagedTypeProvider getManagedTypeProvider() Overrides org. Implements org. Doc from org. Returns the provider of managed types.
| |
| getParent | back to summary |
|---|---|
| public StateObject getParent() Overrides org. Implements org. Doc from org. Returns the parent of this
| |
| getQueryBuilder | back to summary |
|---|---|
| public IJPQLQueryBuilder getQueryBuilder() Overrides org. Implements org. Doc from org. Returns the
| |
| getQueryStatement | back to summary |
|---|---|
| public StateObject getQueryStatement() Returns the only child of this state object, which represents one of the three query statement.
| |
| getRoot | back to summary |
|---|---|
| public JPQLQueryStateObject getRoot() Overrides org. Implements org. Doc from org. Returns the root of the
| |
| hasQueryStatement | back to summary |
|---|---|
| public boolean hasQueryStatement() Determines whether a query statement has been defined.
| |
| initialize | back to summary |
|---|---|
| protected void initialize(IJPQLQueryBuilder queryBuilder, IManagedTypeProvider provider) Initializes this
| |
| 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(CharSequence jpqlFragment, String queryBNFId) Parses the given JPQL fragment as this state object's query statement.
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(JPQLExpression expression) Keeps a reference of the
| |
| setQueryStatement | back to summary |
|---|---|
| public void setQueryStatement(StateObject queryStatement) Sets the only child of this state object, which represents one of the three query statement.
| |
| toTextInternal | back to summary |
|---|---|
| protected void toTextInternal(Appendable writer) throws IOException Implements abstract org. Doc from org. Prints out a string representation of this
| |