Purpose:Used for all relation operators except for between.
| Modifier and Type | Field and Description |
|---|---|
| protected Boolean | isObjectComparisonExpression
PERF: Cache if the expression is an object comparison expression. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected boolean | |
| protected Expression | Returns: null if cannot be optimized, otherwise the optimized normalized expression.PERF: Optimize out unnecessary joins. |
| protected void | convertNodeToUseOuterJoin()
Overrides org. |
| public String | descriptionOfNodeType()
Overrides org. |
| protected boolean | doesAnyOfLeftValuesConform(Vector<E> leftValues, Object rightValue, AbstractSession session)
Conform in-memory the collection of left values with the right value for this expression. |
| public boolean | doesConform(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; if object is not in the UOW cache
but some of its attributes are, use the registered versions of
object's attributes for the purposes of this method. isObjectUnregistered)Overrides org. |
| public boolean | doesObjectConform(Object leftValue, Object rightValue, AbstractSession session)
INTERNAL: Check if the object conforms to the expression in memory. |
| protected boolean | doValuesConform(Object leftValue, Object rightValue, AbstractSession session)
Conform in-memory the two values. |
| public boolean | extractFields(boolean requireExactMatch, boolean primaryKey, ClassDescriptor descriptor, List<DatabaseField> searchFields, Set<DatabaseField> foundFields)
Overrides org. |
| public boolean | extractValues(boolean primaryKeyOnly, boolean
refers to the primary key extracted gaurenteeing the result,
if not exact it is a heuristic and the cache hit will be conformed to the expression after the lookup
Return false if not on the primary key. requireExactMatch, ClassDescriptor descriptor, AbstractRecord primaryKeyRow, AbstractRecord translationRow)Overrides org. |
| public boolean | isEqualNull(ExpressionSQLPrinter printer)
Check if the expression is an equal null expression, these must be handle in a special way in SQL. |
| public boolean | isNotEqualNull(ExpressionSQLPrinter printer)
Check if the expression is an equal null expression, these must be handle in a special way in SQL. |
| protected boolean | |
| public boolean | isRelationExpression()
Overrides org. |
| public Expression | normalize(ExpressionNormalizer normalizer)
Overrides org. |
| public boolean | performSelector(boolean areValuesEqual)
INTERNAL: Check if the object conforms to the expression in memory. |
| public void | printJava(ExpressionJavaPrinter printer)
Overrides org. |
| public void | printSQL(ExpressionSQLPrinter printer)
Overrides org. |
| public void | printSQLNoParens(ExpressionSQLPrinter printer)
INTERNAL: Print SQL without adding parentheses (for DB2 outer joins). |
| public void | validateNode()
Overrides org. |
| isObjectComparisonExpression | back to summary |
|---|---|
| protected Boolean isObjectComparisonExpression PERF: Cache if the expression is an object comparison expression. | |
| RelationExpression | back to summary |
|---|---|
| public RelationExpression() | |
| allChildrenAreFields | back to summary |
|---|---|
| protected boolean allChildrenAreFields() Test that both of our children are field nodes | |
| checkForeignKeyJoinOptimization | back to summary |
|---|---|
| protected Expression checkForeignKeyJoinOptimization(Expression first, Expression second, ExpressionNormalizer normalizer) PERF: Optimize out unnecessary joins. Check for relation based on foreign keys, i.e. emp.address.id = :id, and avoid join.
| |
| convertNodeToUseOuterJoin | back to summary |
|---|---|
| protected void convertNodeToUseOuterJoin() Overrides org. INTERNAL: Modify this individual expression node to use outer joins wherever there are equality operations between two field nodes.
| |
| descriptionOfNodeType | back to summary |
|---|---|
| public String descriptionOfNodeType() Overrides org. INTERNAL: Used for debug printing.
| |
| doesAnyOfLeftValuesConform | back to summary |
|---|---|
| protected boolean doesAnyOfLeftValuesConform(Vector<E> leftValues, Object rightValue, AbstractSession session) Conform in-memory the collection of left values with the right value for this expression. This is used for anyOf support when the left side is a collection of values. | |
| doesConform | back to summary |
|---|---|
| public boolean doesConform(Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered) Overrides org. INTERNAL: Check if the object conforms to the expression in memory. This is used for in-memory querying. If the expression in not able to determine if the object conform throw a not supported exception.
| |
| doesObjectConform | back to summary |
|---|---|
| public boolean doesObjectConform(Object leftValue, Object rightValue, AbstractSession session) INTERNAL: Check if the object conforms to the expression in memory. This is used for in-memory querying across object relationships. | |
| doValuesConform | back to summary |
|---|---|
| protected boolean doValuesConform(Object leftValue, Object rightValue, AbstractSession session) Conform in-memory the two values. | |
| extractFields | back to summary |
|---|---|
| public boolean extractFields(boolean requireExactMatch, boolean primaryKey, ClassDescriptor descriptor, List<DatabaseField> searchFields, Set<DatabaseField> foundFields) Overrides org. INTERNAL: Return if the expression is not a valid primary key expression and add all primary key fields to the set.
| |
| extractValues | back to summary |
|---|---|
| public boolean extractValues(boolean primaryKeyOnly, boolean requireExactMatch, ClassDescriptor descriptor, AbstractRecord primaryKeyRow, AbstractRecord translationRow) Overrides org. INTERNAL: Extract the values from the expression into the row. Ensure that the query is querying the exact primary key.
| |
| isEqualNull | back to summary |
|---|---|
| public boolean isEqualNull(ExpressionSQLPrinter printer) Check if the expression is an equal null expression, these must be handle in a special way in SQL. | |
| isNotEqualNull | back to summary |
|---|---|
| public boolean isNotEqualNull(ExpressionSQLPrinter printer) Check if the expression is an equal null expression, these must be handle in a special way in SQL. | |
| isObjectComparison | back to summary |
|---|---|
| protected boolean isObjectComparison(AbstractSession session) INTERNAL: Return if the represents an object comparison. | |
| isRelationExpression | back to summary |
|---|---|
| public boolean isRelationExpression() Overrides org. INTERNAL:
| |
| normalize | back to summary |
|---|---|
| public Expression normalize(ExpressionNormalizer normalizer) Overrides org. INTERNAL: Check for object comparison as this requires for the expression to be replaced by the object comparison.
| |
| performSelector | back to summary |
|---|---|
| public boolean performSelector(boolean areValuesEqual) INTERNAL: Check if the object conforms to the expression in memory. This is used for in-memory querying across object relationships. | |
| 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
| |
| printSQLNoParens | back to summary |
|---|---|
| public void printSQLNoParens(ExpressionSQLPrinter printer) INTERNAL: Print SQL without adding parentheses (for DB2 outer joins). | |
| validateNode | back to summary |
|---|---|
| public void validateNode() Overrides org. Do any required validation for this node. Throw an exception if it's incorrect.
| |