public class RelationExpression extends CompoundExpression
Purpose:Used for all relation operators except for between.
shouldUseUpperCaseForIgnoreCase
Constructor and Description |
---|
RelationExpression() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
descriptionOfNodeType()
INTERNAL:
Used for debug printing.
|
boolean |
doesConform(java.lang.Object object,
AbstractSession session,
AbstractRecord translationRow,
int 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.
|
boolean |
extractFields(boolean requireExactMatch,
boolean primaryKey,
ClassDescriptor descriptor,
java.util.List<DatabaseField> searchFields,
java.util.Set<DatabaseField> foundFields)
INTERNAL:
Return if the expression is not a valid primary key expression and add all primary key fields to the set.
|
boolean |
extractValues(boolean primaryKeyOnly,
boolean requireExactMatch,
ClassDescriptor descriptor,
AbstractRecord primaryKeyRow,
AbstractRecord translationRow)
INTERNAL:
Extract the values 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.
|
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, asOf, computeHashCode, create, create, equals, getBuilder, getFirstChild, getOperator, getPlatformOperator, getSecondChild, initializePlatformOperator, isCompoundExpression, iterateOn, rebuildOn, resetPlaceHolderBuilder, setOperator, shallowClone, twistedForBaseAndContext, writeDescriptionOn, writeSubexpressionsTo
addDate, addDate, addMonths, addMonths, alias, all, 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, any, anyOf, anyOf, anyOfAllowingNone, anyOfAllowingNone, as, as, ascending, asciiValue, assignTableAliasesStartingAt, average, between, between, between, between, between, between, between, between, between, caseConditionStatement, caseConditionStatement, caseStatement, caseStatement, cast, clone, cloneUsing, coalesce, coalesce, concat, containsAllKeyWords, containsAnyKeyWords, containsSubstring, containsSubstring, containsSubstringIgnoringCase, containsSubstringIgnoringCase, convertToUseOuterJoin, copiedVersionFrom, count, createWithBaseLast, currentDate, currentDateDate, currentTime, currentTimeStamp, dateDifference, dateDifference, dateName, datePart, dateToString, decode, descending, difference, distinct, doesConform, equal, equal, equal, equal, equal, equal, equal, equal, equal, equal, equalOuterJoin, equalOuterJoin, equalsIgnoreCase, equalsIgnoreCase, except, except, exceptAll, exceptAll, exists, existsNode, extract, extractPrimaryKeyValues, extractValue, extractXml, from, fromConstant, fromLiteral, get, get, getAlias, getAllowingNull, getAsOfClause, getAsOfClauseRecursively, getClonedField, getField, getField, getFields, getFieldValue, getFunction, getFunction, getFunction, getFunction, getFunction, getFunctionWithArguments, getFunctionWithArguments, getLeafDescriptor, getLeafMapping, getName, getNumberVal, getOperator, getOwnedTables, getParameter, getParameter, getParameter, getProperty, getSelectionFields, getSelectionFields, 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, hashCode, hexToRaw, ifNull, in, in, in, in, in, in, in, in, in, in, in, in, index, indexOf, intersect, intersect, intersectAll, intersectAll, isClassTypeExpression, isConstantExpression, isDataExpression, isEmpty, isExpressionBuilder, isFieldExpression, isFragment, isFunctionExpression, isLiteralExpression, isLogicalExpression, isMapEntryExpression, isNull, isObjectExpression, isParameterExpression, isQueryKeyExpression, isSubSelectExpression, isTableExpression, isTreatExpression, isValueExpression, join, lastDay, leftJoin, 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, mapEntry, mapKey, 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, notLike, notLike, notNull, nullIf, nullsFirst, nullsLast, operator, or, performOperator, postfixSQL, prefixSQL, ref, regexp, regexp, replace, replicate, replicate, reverse, right, right, rightPad, rightPad, rightTrim, rightTrim, roundDate, selectIfOrderedBy, setLocalBase, setSelectIfOrderedBy, size, size, some, some, some, some, some, some, some, some, some, some, some, some, some, sql, standardDeviation, subQuery, substring, substring, substring, substring, sum, toChar, toChar, toCharacter, toDate, toLowerCase, toNumber, toString, toString, toUpperCase, toUppercaseCasedWords, translate, treat, trim, trim, truncateDate, twist, type, union, union, unionAll, unionAll, value, value, value, value, value, value, value, value, value, value, valueFromObject, valueFromObject, variance, writeFields
public java.lang.String descriptionOfNodeType()
descriptionOfNodeType
in class CompoundExpression
public boolean doesConform(java.lang.Object object, AbstractSession session, AbstractRecord translationRow, int valueHolderPolicy, boolean isObjectUnregistered)
doesConform
in class Expression
isObjectUnregistered
- 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.public boolean doesObjectConform(java.lang.Object leftValue, java.lang.Object rightValue, AbstractSession session)
public boolean extractValues(boolean primaryKeyOnly, boolean requireExactMatch, ClassDescriptor descriptor, AbstractRecord primaryKeyRow, AbstractRecord translationRow)
extractValues
in class Expression
requireExactMatch
- 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.public boolean extractFields(boolean requireExactMatch, boolean primaryKey, ClassDescriptor descriptor, java.util.List<DatabaseField> searchFields, java.util.Set<DatabaseField> foundFields)
extractFields
in class Expression
public boolean isEqualNull(ExpressionSQLPrinter printer)
public boolean isNotEqualNull(ExpressionSQLPrinter printer)
public boolean isRelationExpression()
isRelationExpression
in class Expression
public Expression normalize(ExpressionNormalizer normalizer)
normalize
in class CompoundExpression
public boolean performSelector(boolean areValuesEqual)
public void printSQL(ExpressionSQLPrinter printer)
printSQL
in class CompoundExpression
public void printJava(ExpressionJavaPrinter printer)
printJava
in class CompoundExpression
public void printSQLNoParens(ExpressionSQLPrinter printer)
public void validateNode()
validateNode
in class CompoundExpression
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference