public class RelationExpression extends CompoundExpression
Purpose:Used for all relation operators except for between.
firstChild, operator, platformOperator, secondChildcurrentAlias, lastTable, selectIfOrderedBy| Constructor and Description |
|---|
RelationExpression()
RelationExpression constructor comment.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allChildrenAreFields()
Test that both of our children are field nodes
|
protected void |
convertNodeToUseOuterJoin()
INTERNAL:
Modify this individual expression node to use outer joins wherever there are
equality operations between two field nodes.
|
java.lang.String |
descriptionOfNodeType()
INTERNAL:
Used for debug printing.
|
protected boolean |
doesAnyOfLeftValuesConform(java.util.Vector leftValues,
java.lang.Object rightValue,
AbstractSession session)
Conform in-memory the collection of left values with the right value for this expression.
|
boolean |
doesConform(java.lang.Object object,
AbstractSession session,
AbstractRecord translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy,
boolean isObjectUnregistered)
INTERNAL:
Check if the object conforms to the expression in memory.
|
boolean |
doesObjectConform(java.lang.Object leftValue,
java.lang.Object rightValue,
AbstractSession session)
INTERNAL:
Check if the object conforms to the expression in memory.
|
protected boolean |
doValuesConform(java.lang.Object leftValue,
java.lang.Object rightValue,
AbstractSession session)
Conform in-memory the two values.
|
boolean |
extractPrimaryKeyValues(boolean requireExactMatch,
ClassDescriptor descriptor,
AbstractRecord primaryKeyRow,
AbstractRecord translationRow)
INTERNAL:
Extract the primary key from the expression into the row.
|
boolean |
isEqualNull(ExpressionSQLPrinter printer)
Check if the expression is an equal null expression, these must be handle in a special way in SQL.
|
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 |
isObjectComparison()
INTERNAL:
Return if the represents an object comparison.
|
boolean |
isRelationExpression()
INTERNAL:
|
Expression |
normalize(ExpressionNormalizer normalizer)
INTERNAL:
Check for object comparison as this requires for the expression to be replaced by the object comparison.
|
boolean |
performSelector(boolean areValuesEqual)
INTERNAL:
Check if the object conforms to the expression in memory.
|
void |
printJava(ExpressionJavaPrinter printer)
INTERNAL:
Print java for project class generation
|
void |
printSQL(ExpressionSQLPrinter printer)
INTERNAL:
Print SQL
|
void |
printSQLNoParens(ExpressionSQLPrinter printer)
INTERNAL:
Print SQL without adding parentheses (for DB2 outer joins).
|
void |
validateNode()
Do any required validation for this node.
|
aliasForTable, create, create, getBuilder, getFirstChild, getOperator, getPlatformOperator, getSecondChild, initializePlatformOperator, isCompoundExpression, iterateOn, postCopyIn, rebuildOn, setFirstChild, setOperator, setSecondChild, twistedForBaseAndContext, writeDescriptionOn, writeSubexpressionsToaddDate, addDate, addMonths, addMonths, all, all, all, all, all, all, all, all, all, all, all, all, allOf, and, any, any, any, any, any, any, any, any, any, any, any, any, anyOf, anyOfAllowingNone, ascending, asciiValue, assignAlias, assignTableAliasesStartingAt, average, between, between, between, between, between, between, between, between, between, caseStatement, clone, cloneUsing, concat, containsAllKeyWords, containsAnyKeyWords, containsSubstring, containsSubstring, containsSubstringIgnoringCase, containsSubstringIgnoringCase, convertToUseOuterJoin, copiedVersionFrom, count, createWithBaseLast, currentDate, currentDateDate, currentTime, currentTimeStamp, dateDifference, dateDifference, dateName, datePart, dateToString, decode, descending, detectExpression, difference, distinct, doesConform, equal, equal, equal, equal, equal, equal, equal, equal, equal, equal, equalOuterJoin, equalOuterJoin, equalsIgnoreCase, equalsIgnoreCase, exists, existsNode, extract, extractValue, from, fromConstant, fromLiteral, get, get, getAllowingNull, getAllowingNull, getClonedField, getField, getField, getFields, getFieldValue, getFunction, getFunction, getFunction, getFunction, getFunctionWithArguments, getName, getNumberVal, getOperator, getOwnedTables, getParameter, getParameter, getParameter, getSession, getStringVal, getTable, getTable, getTableAliases, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, hasAsOfClause, hasBeenAliased, hexToRaw, ifNull, in, in, in, in, in, in, in, in, in, in, in, in, indexOf, isConstantExpression, isDataExpression, isEmpty, isExpressionBuilder, isFieldExpression, isFragment, isFunctionExpression, isLiteralExpression, isLogicalExpression, isNull, isObjectExpression, isParameterExpression, isQueryKeyExpression, isTableExpression, isValueExpression, lastDay, leftPad, leftPad, leftTrim, leftTrim, length, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, lessThanEqual, like, like, like, like, likeIgnoreCase, likeIgnoreCase, literal, locate, locate, locate, maximum, minimum, monthsBetween, newTime, nextDay, noneOf, not, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notBetween, notEmpty, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notExists, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notNull, or, performOperator, postfixSQL, prefixSQL, printSQLWithoutConversion, ref, registerIn, replace, replicate, replicate, resetCache, reverse, right, right, rightPad, rightPad, rightTrim, rightTrim, roundDate, selectIfOrderedBy, setLocalBase, setSelectIfOrderedBy, shallowClone, size, some, some, some, some, some, some, some, some, some, some, some, some, standardDeviation, subQuery, substring, substring, sum, toChar, toChar, toCharacter, toDate, toLowerCase, toNumber, toString, toString, toUpperCase, toUppercaseCasedWords, translate, trim, trim, truncateDate, twist, value, value, value, value, value, value, value, value, value, value, valueFromObject, valueFromObject, variance, writeField, writeFieldspublic RelationExpression()
protected boolean allChildrenAreFields()
protected void convertNodeToUseOuterJoin()
convertNodeToUseOuterJoin in class Expressionpublic java.lang.String descriptionOfNodeType()
descriptionOfNodeType in class CompoundExpressionpublic boolean doesConform(java.lang.Object object,
AbstractSession session,
AbstractRecord translationRow,
InMemoryQueryIndirectionPolicy valueHolderPolicy,
boolean isObjectUnregistered)
doesConform in class Expressionprotected boolean doesAnyOfLeftValuesConform(java.util.Vector leftValues,
java.lang.Object rightValue,
AbstractSession session)
protected boolean doValuesConform(java.lang.Object leftValue,
java.lang.Object rightValue,
AbstractSession session)
public boolean doesObjectConform(java.lang.Object leftValue,
java.lang.Object rightValue,
AbstractSession session)
public boolean extractPrimaryKeyValues(boolean requireExactMatch,
ClassDescriptor descriptor,
AbstractRecord primaryKeyRow,
AbstractRecord translationRow)
extractPrimaryKeyValues in class ExpressionrequireExactMatch - refers to the primary key extracted gaurenteeing the result,
if not exact it is a hueristic and the cache hit will be conformed to the expression after the lookup
Return false if not on the primary key.public boolean isEqualNull(ExpressionSQLPrinter printer)
public boolean isNotEqualNull(ExpressionSQLPrinter printer)
protected boolean isObjectComparison()
public boolean isRelationExpression()
isRelationExpression in class Expressionpublic Expression normalize(ExpressionNormalizer normalizer)
normalize in class CompoundExpressionpublic boolean performSelector(boolean areValuesEqual)
public void printSQL(ExpressionSQLPrinter printer)
printSQL in class CompoundExpressionpublic void printJava(ExpressionJavaPrinter printer)
printJava in class CompoundExpressionpublic void printSQLNoParens(ExpressionSQLPrinter printer)
public void validateNode()
validateNode in class CompoundExpression