| Modifier and Type | Field and Description |
|---|---|
| protected DatabaseField | aliasedField
Cache the aliased field. |
| protected boolean | |
| protected boolean | |
| protected IndexExpression | |
| protected Boolean | isAttributeExpression
PERF: Cache if the expression is an attribute expression. |
| protected boolean | |
| protected transient DatabaseMapping | mapping
Cache the mapping for performance. |
| protected String | name
The name of the query key. |
| protected transient QueryKey | queryKey
Cache the query key for performance. |
| protected boolean | shouldQueryToManyRelationship
Is this a query across a 1:many or many:many relationship. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Expression | additionalExpressionCriteria()
Overrides org. |
| public Map | additionalExpressionCriteriaMap()
Overrides org. |
| public DatabaseTable | aliasForTable(DatabaseTable table)
Overrides org. |
| protected Expression | checkJoinForSubSelectWithParent(ExpressionNormalizer normalizer, Expression base, List<Expression> foreignKeyJoinPointer)
INTERNAL: Check if new expression need to be created for sub queries and re-normalized. |
| public int | computeHashCode()
Overrides org. |
| public String | descriptionOfNodeType()
Overrides org. |
| public void | |
| public boolean | equals(Object
the reference object with which to compare. object)Overrides org. |
| public List | getAdditionalTables()
Overrides org. |
| public DatabaseField | getAliasedField()
Overrides org. |
| protected DatabaseTable | |
| public DatabaseField | |
| public Vector | getFields()
Overrides org. |
| public Object | getFieldValue(Object objectValue, AbstractSession session)
Overrides org. |
| public ClassDescriptor | getLeafDescriptor(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session)
Overrides org. |
| public DatabaseMapping | getLeafMapping(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session)
Overrides org. |
| public ClassDescriptor | getMapKeyDescriptor()
INTERNAL: Return if descriptor for the map key mapping where the key is a OneToOne. |
| public DatabaseMapping | |
| public DatabaseMapping | |
| public String | |
| public String | |
| public List | getOwnedTables()
Overrides org. |
| public QueryKey | |
| public DatabaseTable | Returns: DatabaseTableCalculate the reference table for based on the various QueryKeyExpression usages (join query keys, custom defined query keys, or query keys for mappings). |
| public DatabaseTable | Returns: DatabaseTableOverrides org. |
| public List | getSelectionFields(ReadQuery query)
Overrides org. |
| public DatabaseTable | Returns: DatabaseTableCalculate the source table for based on the various QueryKeyExpression usages (join query keys, custom defined query keys, or query keys for mappings). |
| public Expression | |
| protected void | |
| public boolean | isAttribute()
Overrides org. |
| public boolean | isDirectCollection()
Overrides org. |
| public boolean | |
| public boolean | isMapKeyObjectRelationship()
INTERNAL: Return if the expression if for a map key mapping where the key is a OneToOne. |
| public boolean | |
| public boolean | |
| public boolean | isQueryKeyExpression()
Overrides org. |
| public Expression | |
| public Expression | normalize(ExpressionNormalizer normalizer)
Overrides org. |
| public Expression | normalize(ExpressionNormalizer normalizer, Expression base, List<Expression> foreignKeyJoinPointer)
INTERNAL: For CR#2456 if this is part of an objExp.equal(objExp), do not need to add additional expressions to normalizer both times, and the foreign key join replaces the equal expression. |
| protected void | postCopyIn(Map<K, V> alreadyDone)
Overrides org. |
| public void | printJava(ExpressionJavaPrinter printer)
Overrides org. |
| public void | printSQL(ExpressionSQLPrinter printer)
Overrides org. |
| public Expression | rebuildOn(Expression newBase)
Implements abstract org. |
| public Expression | rebuildOn(Expression oldBase, Expression newBase)
INTERNAL: A special version of rebuildOn where the newBase need not be a new ExpressionBuilder but any expression. |
| protected void | resetCache()
Overrides org. |
| public boolean | |
| public Expression | treat(Class<?> castClass)
Overrides org. |
| public Expression | twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)
Overrides org. |
| public void | validateNode()
Overrides org. |
| public Object | valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean
true if object possibly not a clone, but is being
conformed against the unit of work cache. isObjectUnregistered)Overrides org. |
| public Object | valuesFromCollection(Object object, AbstractSession session, int valueHolderPolicy, boolean isObjectUnregistered)
INTERNAL This method iterates through a collection and gets the values from the objects to conform in an in-memory query. |
| public void | writeDescriptionOn(BufferedWriter writer)
Overrides org. |
| aliasedField | back to summary |
|---|---|
| protected DatabaseField aliasedField Cache the aliased field. Only applies to attributes. | |
| hasMapping | back to summary |
|---|---|
| protected boolean hasMapping | |
| hasQueryKey | back to summary |
|---|---|
| protected boolean hasQueryKey | |
| index | back to summary |
|---|---|
| protected IndexExpression index | |
| isAttributeExpression | back to summary |
|---|---|
| protected Boolean isAttributeExpression PERF: Cache if the expression is an attribute expression. | |
| isClonedForSubQuery | back to summary |
|---|---|
| protected boolean isClonedForSubQuery | |
| mapping | back to summary |
|---|---|
| protected transient DatabaseMapping mapping Cache the mapping for performance. Store a boolean so we don't repeat the search if there isn't one. | |
| name | back to summary |
|---|---|
| protected String name The name of the query key. | |
| queryKey | back to summary |
|---|---|
| protected transient QueryKey queryKey Cache the query key for performance. Store a boolean so we don't repeat the search if there isn't one. | |
| shouldQueryToManyRelationship | back to summary |
|---|---|
| protected boolean shouldQueryToManyRelationship Is this a query across a 1:many or many:many relationship. Does not apply to attributes. | |
| QueryKeyExpression | back to summary |
|---|---|
| public QueryKeyExpression() | |
| QueryKeyExpression | back to summary |
|---|---|
| public QueryKeyExpression(String aName, Expression base) | |
| additionalExpressionCriteria | back to summary |
|---|---|
| public Expression additionalExpressionCriteria() Overrides org. INTERNAL: Return the expression to join the main table of this node to any auxiliary tables.
| |
| additionalExpressionCriteriaMap | back to summary |
|---|---|
| public Map Overrides org. INTERNAL: Used in case outer joins should be printed in FROM clause. Each of the additional tables mapped to expressions that joins it.
| |
| aliasForTable | back to summary |
|---|---|
| public DatabaseTable aliasForTable(DatabaseTable table) Overrides org. INTERNAL: Find the alias for a given table
| |
| checkJoinForSubSelectWithParent | back to summary |
|---|---|
| protected Expression checkJoinForSubSelectWithParent(ExpressionNormalizer normalizer, Expression base, List<Expression> foreignKeyJoinPointer) INTERNAL: Check if new expression need to be created for sub queries and re-normalized. | |
| computeHashCode | back to summary |
|---|---|
| public int computeHashCode() Overrides org. INTERNAL: Compute a consistent hash-code for the expression. This is used to allow dynamic expression's SQL to be cached.
| |
| descriptionOfNodeType | back to summary |
|---|---|
| public String descriptionOfNodeType() Overrides org. INTERNAL: Used for debug printing.
| |
| doQueryToManyRelationship | back to summary |
|---|---|
| public void doQueryToManyRelationship() INTERNAL: | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides org. INTERNAL: Return if the expression is equal to the other. This is used to allow dynamic expression's SQL to be cached.
| |
| getAdditionalTables | back to summary |
|---|---|
| public List Overrides org. INTERNAL: Return any additional tables that belong to this expression An example of how this method is used is to return any tables that belong to the map key when this expression traverses a mapping that uses a Map
| |
| getAliasedField | back to summary |
|---|---|
| public DatabaseField getAliasedField() Overrides org. INTERNAL: Return the field appropriately aliased
| |
| getAliasedTable | back to summary |
|---|---|
| protected DatabaseTable getAliasedTable() Return the alias for our table | |
| getField | back to summary |
|---|---|
| public DatabaseField getField() Overrides org. INTERNAL:
| |
| getFields | back to summary |
|---|---|
| public Vector Overrides org. INTERNAL: Return all the fields
| |
| getFieldValue | back to summary |
|---|---|
| public Object getFieldValue(Object objectValue, AbstractSession session) Overrides org. INTERNAL: Transform the object-level value into a database-level value
| |
| getLeafDescriptor | back to summary |
|---|---|
| public ClassDescriptor getLeafDescriptor(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session) Overrides org. INTERNAL: Lookup the descriptor for this item by traversing its expression recursively.
| |
| getLeafMapping | back to summary |
|---|---|
| public DatabaseMapping getLeafMapping(DatabaseQuery query, ClassDescriptor rootDescriptor, AbstractSession session) Overrides org. INTERNAL: Lookup the mapping for this item by traversing its expression recursively. If an aggregate of foreign mapping is found it is traversed.
| |
| getMapKeyDescriptor | back to summary |
|---|---|
| public ClassDescriptor getMapKeyDescriptor() INTERNAL: Return if descriptor for the map key mapping where the key is a OneToOne. | |
| getMapping | back to summary |
|---|---|
| public DatabaseMapping getMapping() Overrides org.
| |
| getMappingFromQueryKey | back to summary |
|---|---|
| public DatabaseMapping getMappingFromQueryKey() | |
| getName | back to summary |
|---|---|
| public String getName() Overrides org. Doc from org. INTERNAL:
| |
| getNestedAttributeName | back to summary |
|---|---|
| public String getNestedAttributeName() INTERNAL: Returns nested attribute name or null | |
| getOwnedTables | back to summary |
|---|---|
| public List Overrides org. INTERNAL:
| |
| getQueryKeyOrNull | back to summary |
|---|---|
| public QueryKey getQueryKeyOrNull() Overrides org.
| |
| getReferenceTable | back to summary |
|---|---|
| public DatabaseTable getReferenceTable() Calculate the reference table for based on the various QueryKeyExpression
usages (join query keys, custom defined query keys, or query keys for
mappings).
Called from
| |
| getRelationTable | back to summary |
|---|---|
| public DatabaseTable getRelationTable() Overrides org. Calculate the relation table for based on the various QueryKeyExpression
usages (join query keys, custom defined query keys, or query keys for
mappings).
Called from
| |
| getSelectionFields | back to summary |
|---|---|
| public List Overrides org. INTERNAL:
| |
| getSourceTable | back to summary |
|---|---|
| public DatabaseTable getSourceTable() Calculate the source table for based on the various QueryKeyExpression
usages (join query keys, custom defined query keys, or query keys for
mappings).
Called from
| |
| index | back to summary |
|---|---|
| public Expression index() Overrides org.
| |
| initializeAliasedField | back to summary |
|---|---|
| protected void initializeAliasedField() INTERNAL: Alias the database field for our current environment | |
| isAttribute | back to summary |
|---|---|
| public boolean isAttribute() Overrides org. INTERNAL: Return if the expression is for a direct mapped attribute.
| |
| isDirectCollection | back to summary |
|---|---|
| public boolean isDirectCollection() Overrides org. INTERNAL: Indicates whether this expression corresponds to DirectCollection.
| |
| isManyToMany | back to summary |
|---|---|
| public boolean isManyToMany() INTERNAL: Indicates whether this expression corresponds to ManyToMany. | |
| isMapKeyObjectRelationship | back to summary |
|---|---|
| public boolean isMapKeyObjectRelationship() INTERNAL: Return if the expression if for a map key mapping where the key is a OneToOne. | |
| isOneToMany | back to summary |
|---|---|
| public boolean isOneToMany() INTERNAL: Indicates whether this expression corresponds to OneToMany. | |
| isOneToOne | back to summary |
|---|---|
| public boolean isOneToOne() INTERNAL: Indicates whether this expression corresponds to OneToOne. | |
| isQueryKeyExpression | back to summary |
|---|---|
| public boolean isQueryKeyExpression() Overrides org. Doc from org. INTERNAL:
| |
| mappingCriteria | back to summary |
|---|---|
| public Expression mappingCriteria(Expression base) | |
| normalize | back to summary |
|---|---|
| public Expression normalize(ExpressionNormalizer normalizer) Overrides org. INTERNAL: Normalize the expression into a printable structure. Any joins must be added to form a new root.
| |
| normalize | back to summary |
|---|---|
| public Expression normalize(ExpressionNormalizer normalizer, Expression base, List<Expression> foreignKeyJoinPointer) INTERNAL: For CR#2456 if this is part of an objExp.equal(objExp), do not need to add additional expressions to normalizer both times, and the foreign key join replaces the equal expression. | |
| postCopyIn | back to summary |
|---|---|
| protected void postCopyIn(Map<K, V> alreadyDone) Overrides org. INTERNAL: Used for cloning.
| |
| printJava | back to summary |
|---|---|
| public void printJava(ExpressionJavaPrinter printer) Overrides org. INTERNAL: Print java for project class generation
| |
| printSQL | back to summary |
|---|---|
| public void printSQL(ExpressionSQLPrinter printer) Overrides org. INTERNAL: Print SQL onto the stream, using the ExpressionPrinter for context
| |
| rebuildOn | back to summary |
|---|---|
| public Expression rebuildOn(Expression newBase) Implements abstract org. INTERNAL: This expression is built on a different base than the one we want. Rebuild it and return the root of the new tree
| |
| rebuildOn | back to summary |
|---|---|
| public Expression rebuildOn(Expression oldBase, Expression newBase) INTERNAL: A special version of rebuildOn where the newBase need not be a new ExpressionBuilder but any expression. For nested joined attributes, the joined attribute query must have its joined attributes rebuilt relative to it. | |
| resetCache | back to summary |
|---|---|
| protected void resetCache() Overrides org. Reset cached information here so that we can be sure we're accurate.
| |
| shouldQueryToManyRelationship | back to summary |
|---|---|
| public boolean shouldQueryToManyRelationship() | |
| treat | back to summary |
|---|---|
| public Expression treat(Class<?> castClass) Overrides org. ADVANCED: Return an expression that allows you to treat its base as if it were a subclass of the class returned by the base This can only be called on an ExpressionBuilder, the result of expression.get(String), expression.getAllowingNull(String), the result of expression.anyOf("String") or the result of expression.anyOfAllowingNull("String") downcast uses Expression.type() internally to guarantee the results are of the specified class. Example:
EclipseLink: employee.get("project").treat(LargeProject.class).get("budget").equal(1000)
Java: ((LargeProject)employee.getProjects().get(0)).getBudget() == 1000
SQL: LPROJ.PROJ_ID (+)= PROJ.PROJ_ID AND L_PROJ.BUDGET = 1000 AND PROJ.TYPE = "L"
| |
| twistedForBaseAndContext | back to summary |
|---|---|
| public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase) Overrides org. INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression. This is used for transforming a standalone expression (e.g. the join criteria of a mapping) into part of some larger expression. You normally would not call this directly, instead calling twist See the comment there for more details"
| |
| validateNode | back to summary |
|---|---|
| public void validateNode() Overrides org. Do any required validation for this node. Throw an exception if it's incorrect.
| |
| valueFromObject | back to summary |
|---|---|
| public Object valueFromObject(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) Overrides org. INTERNAL: Return the value for in memory comparison. This is only valid for valueable expressions.
| |
| valuesFromCollection | back to summary |
|---|---|
| public Object valuesFromCollection(Object object, AbstractSession session, int valueHolderPolicy, boolean isObjectUnregistered) INTERNAL This method iterates through a collection and gets the values from the objects to conform in an in-memory query. | |
| writeDescriptionOn | back to summary |
|---|---|
| public void writeDescriptionOn(BufferedWriter writer) throws IOException Overrides org. INTERNAL: Used to print a debug form of the expression tree.
| |