collection_member_declaration ranges over
values of a collection obtained by navigation using a path expression. Such a path expression
represents a navigation involving the association-fields of an entity abstract schema type.
Because a path expression can be based on another path expression, the navigation can use the
association-fields of related entities. An identification variable of a collection member
declaration is declared using a special operator, the reserved identifier IN.
The argument to the IN operator is a collection-valued path expression. The
path expression evaluates to a collection type specified as a result of navigation to a
collection-valued association-field of an entity abstract schema type. The syntax for declaring a
collection member identification variable is as follows:
BNF: collection_member_declaration ::= IN(collection_valued_path_expression) [AS] identification_variable
BNF: derived_collection_member_declaration ::= IN superquery_identification_variable.{single_valued_object_field.}*collection_valued_field
FromClauseStateObject, CollectionMemberDeclaration
| 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 |
| private CollectionValuedPathExpressionStateObject | collectionValuedPath
The model object representing the collection-valued association-field of an entity abstract schema type. |
| private boolean | derived
Determines whether this collection member declaration is used as a deriving collection-valued path expression. |
| private IdentificationVariableStateObject | identificationVariable
The model object representing an identification variable evaluating to a collection-valued association-field of an entity abstract schema type. |
| Access | Constructor and Description |
|---|---|
| public | CollectionMemberDeclarationStateObject(AbstractFromClauseStateObject
The parent of this state object, which cannot be parent)nullCreates a new |
| public | CollectionMemberDeclarationStateObject(AbstractFromClauseStateObject
The parent of this state object, which cannot be parent, ListIterator<String> nullThe segments that represent the collection-valued path paths, boolean Determine whether the as, String AS identifier is used or notThe identification variable declaring the collection-valued path identificationVariable)Creates a new |
| public | CollectionMemberDeclarationStateObject(AbstractFromClauseStateObject
The parent of this state object, which cannot be parent, ListIterator<String> nullThe segments that represent the collection-valued path paths, String The identification variable declaring the collection-valued path identificationVariable)Creates a new |
| public | CollectionMemberDeclarationStateObject(SimpleFromClauseStateObject
The parent of this state object, which cannot be parent, String nullThe derived collection-valued path expression collectionValuedPath)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 CollectionMemberDeclarationStateObject | |
| protected void | addChildren(List<StateObject>
The list used to store the children children)Overrides org. StateObject to the given list.
|
| public CollectionValuedPathExpressionStateObject | Returns: The collection-valued association-field of an entity abstract schema typeReturns the model object representing the collection-valued association-field of an entity abstract schema type. |
| public CollectionMemberDeclaration | getExpression()
Overrides org. Implements org. StateObject representation of the JPQL query
was created by parsing an existing JPQL query.
|
| public IdentificationVariableStateObject | Returns: The identification variable portion of this declarationReturns the model object representing an identification variable evaluating to a collection-valued association-field of an entity abstract schema type. |
| public IManagedType | getManagedType(StateObject
The stateObject)StateObject that should be an simple identification variable or
an encapsulated identification variable with the identifier KEY or
VALUEImplements org. IManagedType for the given identification variable.
|
| public AbstractFromClauseStateObject | getParent()
Overrides org. Implements org. StateObject.
|
| public boolean | Returns: true if the AS identifier is part
of the expression; false otherwiseDetermines whether the |
| public boolean | Returns: true if an identification variable is defined; false otherwiseDetermines whether an identification variable was defined. |
| public ListIterable | identificationVariables()
Implements org. IdentificationVariableStateObject that are used by this state object.
|
| protected void | initialize()
Overrides org. |
| public boolean | Returns: true if this collection member declaration is used as this form:
"IN collection_valued_path_expression" in a subquery; false
if it's used as this form: IN(collection_valued_path_expression)
[AS] identification_variable" in a top-level or subquery queriesDetermines whether this collection member declaration is used as a derived collection-valued path expression. |
| 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 | setAs(boolean
true if the AS identifier is part of the expression;
false otherwiseSets whether the |
| public void | setDerived(boolean
true if this collection member declaration is used as this form:
"IN collection_valued_path_expression" in a subquery; false
if it's used as this form: IN(collection_valued_path_expression)
[AS] identification_variable" in a top-level or subquery queriesSets whether this collection member declaration is used as a derived collection-valued path expression. |
| public void | setExpression(CollectionMemberDeclaration
The expression)parsed object representing an IN
expressionKeeps a reference of the |
| public void | setIdentificationVariable(String
The new identification variable identificationVariable)Sets the new identification variable that will range over the collection-valued path. |
| public void | |
| public void | |
| public void | setPaths(ListIterator<String>
The new path expression paths)Changes the path expression with the list of segments, the identification variable will also be updated with the first segment. |
| public void | |
| 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.
|
| 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 | |
| collectionValuedPath | back to summary |
|---|---|
| private CollectionValuedPathExpressionStateObject collectionValuedPath The model object representing the collection-valued association-field of an entity abstract schema type. | |
| derived | back to summary |
|---|---|
| private boolean derived Determines whether this collection member declaration is used as a deriving collection-valued path expression. | |
| identificationVariable | back to summary |
|---|---|
| private IdentificationVariableStateObject identificationVariable The model object representing an identification variable evaluating to a collection-valued association-field of an entity abstract schema type. | |
| CollectionMemberDeclarationStateObject | back to summary |
|---|---|
| public CollectionMemberDeclarationStateObject(AbstractFromClauseStateObject parent) Creates a new
| |
| CollectionMemberDeclarationStateObject | back to summary |
|---|---|
| public CollectionMemberDeclarationStateObject(AbstractFromClauseStateObject parent, ListIterator<String> paths, boolean as, String identificationVariable) Creates a new
| |
| CollectionMemberDeclarationStateObject | back to summary |
|---|---|
| public CollectionMemberDeclarationStateObject(AbstractFromClauseStateObject parent, ListIterator<String> paths, String identificationVariable) Creates a new
| |
| CollectionMemberDeclarationStateObject | back to summary |
|---|---|
| public CollectionMemberDeclarationStateObject(SimpleFromClauseStateObject parent, String collectionValuedPath) Creates a new
| |
| accept | back to summary |
|---|---|
| public void accept(StateObjectVisitor visitor) Implements org. Doc from org. Visits this
| |
| addAs | back to summary |
|---|---|
| public CollectionMemberDeclarationStateObject addAs() Makes sure the
| |
| addChildren | back to summary |
|---|---|
| protected void addChildren(List<StateObject> children) Overrides org. Doc from org. Adds the children of this
| |
| getCollectionValuedPath | back to summary |
|---|---|
| public CollectionValuedPathExpressionStateObject getCollectionValuedPath() Returns the model object representing the collection-valued association-field of an entity abstract schema type.
| |
| getExpression | back to summary |
|---|---|
| public CollectionMemberDeclaration getExpression() Overrides org. Implements org. Doc from org. Returns the actual parsed object if this
| |
| getIdentificationVariable | back to summary |
|---|---|
| public IdentificationVariableStateObject getIdentificationVariable() Returns the model object representing an identification variable evaluating to a collection-valued association-field of an entity abstract schema type.
| |
| getManagedType | back to summary |
|---|---|
| public IManagedType getManagedType(StateObject stateObject) Implements org. Doc from org. Returns the
In the above query, the managed type associated with the identification variable:
| |
| getParent | back to summary |
|---|---|
| public AbstractFromClauseStateObject getParent() Overrides org. Implements org. Doc from org. Returns the parent of this
| |
| hasAs | back to summary |
|---|---|
| public boolean hasAs() Determines whether the
| |
| hasIdentificationVariable | back to summary |
|---|---|
| public boolean hasIdentificationVariable() Determines whether an identification variable was defined.
| |
| identificationVariables | back to summary |
|---|---|
| public ListIterable Implements org. Returns the
| |
| initialize | back to summary |
|---|---|
| protected void initialize() Overrides org. Doc from org. Initializes this state object.
| |
| isDerived | back to summary |
|---|---|
| public boolean isDerived() Determines whether this collection member declaration is used as a derived collection-valued path expression.
| |
| isEquivalent | back to summary |
|---|---|
| public boolean isEquivalent(StateObject stateObject) Overrides org. Implements org. Doc from org. Determines whether the given
| |
| removeAs | back to summary |
|---|---|
| public void removeAs() Makes sure the | |
| setAs | back to summary |
|---|---|
| public void setAs(boolean as) Sets whether the
| |
| setDerived | back to summary |
|---|---|
| public void setDerived(boolean derived) Sets whether this collection member declaration is used as a derived collection-valued path expression.
| |
| setExpression | back to summary |
|---|---|
| public void setExpression(CollectionMemberDeclaration expression) Keeps a reference of the
| |
| setIdentificationVariable | back to summary |
|---|---|
| public void setIdentificationVariable(String identificationVariable) Sets the new identification variable that will range over the collection-valued path.
| |
| setPath | back to summary |
|---|---|
| public void setPath(String path) Changes the path expression with the list of segments, the identification variable will also be updated with the first segment.
| |
| setPaths | back to summary |
|---|---|
| public void setPaths(List<String> paths) Changes the path expression with the list of segments, the identification variable will also be updated with the first segment. | |
| setPaths | back to summary |
|---|---|
| public void setPaths(ListIterator<String> paths) Changes the path expression with the list of segments, the identification variable will also be updated with the first segment.
| |
| setPaths | back to summary |
|---|---|
| public void setPaths(String... paths) Changes the path expression with the list of segments, the identification variable will also be updated with the first segment.
| |
| toggleAs | back to summary |
|---|---|
| public void toggleAs() Toggles the usage 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
| |