DatabaseQuery and checks if it's a constructor query. If it is one,
then the fully qualified class name and the persistent fields will be available.
| Modifier and Type | Class and Description |
|---|---|
| private class | ConstructorQueryMappings.ConstructorItemVisitor
This visitor visits the constructor items and adds the attribute type mapped to the name. |
| private class | ConstructorQueryMappings.ConstructorVisitor
Visits the JPQL query and gather the information contained in the constructor expressions. |
| Modifier and Type | Field and Description |
|---|---|
| private String | className
The fully qualified class name defined in the constructor expression if one is defined,
otherwise |
| private List | mappings
The list of |
| private DatabaseQuery | query
The |
| Access | Constructor and Description |
|---|---|
| pack-priv | ConstructorQueryMappings(DatabaseQuery
The query)DatabaseQuery for which its JPQL query was scanned to check if it's
constructor query and if so, to gather the information.Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: Either the fully qualified class name used in the constructor expression ornull if the query is not a constructor queryReturns the class name used to define the constructor expression. |
| public DatabaseQuery | Returns: TheDatabaseQuery that was scannedReturns the |
| public boolean | Returns: true if the SELECT clause has a single select item
and it's a constructor expression; false otherwiseDetermines whether the JPQL query is a constructor query, i.e. the select expression is a constructor expression. |
| public Iterable | Returns: The list contains the persistent fields that were passed to the constructorReturns a non- |
| pack-priv void | populate(JPQLGrammar
The jpqlGrammar)JPQLGrammar how the JPQL query is parsedPopulates this object by scanning the JPQL query using the given JPQL grammar. |
| className | back to summary |
|---|---|
| private String className The fully qualified class name defined in the constructor expression if one is defined,
otherwise | |
| mappings | back to summary |
|---|---|
| private List<DatabaseMapping> mappings The list of | |
| query | back to summary |
|---|---|
| private DatabaseQuery query The | |
| ConstructorQueryMappings | back to summary |
|---|---|
| pack-priv ConstructorQueryMappings(DatabaseQuery query) Creates a new
| |
| getClassName | back to summary |
|---|---|
| public String getClassName() Returns the class name used to define the constructor expression.
| |
| getQuery | back to summary |
|---|---|
| public DatabaseQuery getQuery() Returns the
| |
| isConstructorQuery | back to summary |
|---|---|
| public boolean isConstructorQuery() Determines whether the JPQL query is a constructor query, i.e. the select expression is a constructor expression.
Example:
| |
| mappings | back to summary |
|---|---|
| public Iterable Returns a non-
| |
| populate | back to summary |
|---|---|
| pack-priv void populate(JPQLGrammar jpqlGrammar) Populates this object by scanning the JPQL query using the given JPQL grammar.
| |
This visitor visits the constructor items and adds the attribute type mapped to the name.
Example:
e.name -> "name" : String
e.address.zipcode -> "zipcode" : int
| Modifier and Type | Field and Description |
|---|---|
| private final JPQLQueryContext |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | visit(CollectionExpression
The expression)Expression to visitOverrides org. Implements org. CollectionExpression expression.
|
| public void | visit(CollectionValuedPathExpression
The expression)Expression to visitOverrides org. Implements org. CollectionValuedPathExpression expression.
|
| public void | visit(StateFieldPathExpression
The expression)Expression to visitOverrides org. Implements org. StateFieldPathExpression expression.
|
| private void |
| queryContext | back to summary |
|---|---|
| private final JPQLQueryContext queryContext | |
| ConstructorItemVisitor | back to summary |
|---|---|
| pack-priv ConstructorItemVisitor(JPQLQueryContext queryContext) | |
| visit | back to summary |
|---|---|
| public void visit(CollectionExpression expression) Overrides org. Implements org. Doc from org. Visits the
| |
| visit | back to summary |
|---|---|
| public void visit(CollectionValuedPathExpression expression) Overrides org. Implements org. Doc from org. Visits the
| |
| visit | back to summary |
|---|---|
| public void visit(StateFieldPathExpression expression) Overrides org. Implements org. Doc from org. Visits the
| |
| visitPathExpression | back to summary |
|---|---|
| private void visitPathExpression(AbstractPathExpression expression) | |
| Modifier and Type | Field and Description |
|---|---|
| private final JPQLQueryContext |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| queryContext | back to summary |
|---|---|
| private final JPQLQueryContext queryContext | |
| ConstructorVisitor | back to summary |
|---|---|
| pack-priv ConstructorVisitor(JPQLQueryContext queryContext) | |
| classLoader | back to summary |
|---|---|
| private DynamicClassLoader classLoader() | |
| visit | back to summary |
|---|---|
| public void visit(ConstructorExpression expression) Overrides org. Implements org. Doc from org. Visits the
| |
| visit | back to summary |
|---|---|
| public void visit(JPQLExpression expression) Overrides org. Implements org. Doc from org. Visits the
| |
| visit | back to summary |
|---|---|
| public void visit(SelectClause expression) Overrides org. Implements org. Doc from org. Visits the
| |
| visit | back to summary |
|---|---|
| public void visit(SelectStatement expression) Overrides org. Implements org. Doc from org. Visits the
| |