Module org.eclipse.persistence.core
Class TableExpression
java.lang.Object
org.eclipse.persistence.expressions.Expression
org.eclipse.persistence.internal.expressions.BaseExpression
org.eclipse.persistence.internal.expressions.DataExpression
org.eclipse.persistence.internal.expressions.TableExpression
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
FromSubSelectExpression
A TableExpression allows for a raw database table to be referenced in a query.
This is used for ManyToMany and DirectCollection mappings to define their selection criteria.
It can also be used directly to mix SQL artifacts with Expressions.
- See Also:
-
Field Summary
FieldsFields inherited from class org.eclipse.persistence.internal.expressions.DataExpression
asOfClause, derivedFields, derivedTables, hasBeenNormalized, tableAliasesFields inherited from class org.eclipse.persistence.internal.expressions.BaseExpression
baseExpression, builderFields inherited from class org.eclipse.persistence.expressions.Expression
currentAlias, hashCode, lastTable, selectIfOrderedBy, shouldUseUpperCaseForIgnoreCase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassignAlias(DatabaseTable alias, DatabaseTable table) INTERNAL: Alias a particular table within this nodeintINTERNAL: Compute a consistent hash-code for the expression.INTERNAL: Used for debug printing.booleanINTERNAL: Return if the expression is equal to the other.INTERNAL: Fully-qualify the databaseField if the table is known.INTERNAL:getTable()booleanINTERNAL:normalize(ExpressionNormalizer normalizer) INTERNAL: Normalize the expression into a printable structure.rebuildOn(Expression newBase) INTERNAL: This expression is built on a different base than the one we want.voidsetTable(DatabaseTable table) INTERNAL: Added for temporal querying.twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase) INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression.voidwriteDescriptionOn(BufferedWriter writer) INTERNAL: Used to print a debug form of the expression tree.Methods inherited from class org.eclipse.persistence.internal.expressions.DataExpression
addDerivedField, addDerivedTable, aliasForTable, asOf, assignAlias, clearAliases, copyCollection, existingDerivedField, existingDerivedTable, getAlias, getAliasedField, getAsOfClause, getContainingDescriptor, getDescriptor, getField, getField, getMapping, getQueryKeyOrNull, getTable, getTable, getTableAliases, hasAsOfClause, hasBeenAliased, hasBeenNormalized, hasDerivedFields, hasDerivedTables, isAttribute, isDataExpression, iterateOn, newDerivedField, newDerivedTable, postCopyIn, printSQL, setHasBeenNormalized, setTableAliases, tableAliasesDescription, writeSubexpressionsToMethods inherited from class org.eclipse.persistence.internal.expressions.BaseExpression
getBaseExpression, getBuilder, resetPlaceHolderBuilder, setBaseExpression, shallowCloneMethods inherited from class org.eclipse.persistence.expressions.Expression
addDate, addDate, addMonths, addMonths, alias, 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, anyOf, anyOfAllowingNone, anyOfAllowingNone, 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, convertNodeToUseOuterJoin, convertToUseOuterJoin, copiedVersionFrom, count, create, create, createWithBaseLast, currentDate, currentDateDate, currentTime, currentTimeStamp, dateDifference, dateDifference, dateName, datePart, dateToString, decode, descending, difference, distinct, doesConform, doesConform, equal, equal, equal, equal, equal, equal, equal, equal, equal, equal, equalOuterJoin, equalOuterJoin, equalsIgnoreCase, equalsIgnoreCase, except, except, exceptAll, exceptAll, exists, existsNode, extract, extractFields, extractPrimaryKeyValues, extractValue, extractValues, extractXml, from, fromConstant, fromLiteral, get, get, getAllowingNull, getAsOfClauseRecursively, getClonedField, getFields, getFieldValue, getFunction, getFunction, getFunction, getFunction, getFunctionWithArguments, getLeafDescriptor, getLeafMapping, getName, getNumberVal, getOperator, getOperator, getParameter, getParameter, getParameter, getProperty, getSelectionFields, getSelectionFields, getSession, getStringVal, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, greaterThanEqual, hashCode, hexToRaw, ifNull, in, in, in, in, in, in, in, in, in, in, in, in, index, indexOf, intersect, intersect, intersectAll, intersectAll, isClassTypeExpression, isCompoundExpression, isConstantExpression, isEmpty, isExpressionBuilder, isFieldExpression, isFragment, isFunctionExpression, isLiteralExpression, isLogicalExpression, isMapEntryExpression, isNull, isObjectExpression, isParameterExpression, isQueryKeyExpression, isRelationExpression, isSubSelectExpression, 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, localDate, localDateTime, localTime, 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, printJava, ref, regexp, regexp, registerIn, replace, replicate, replicate, resetCache, 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, 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, validateNode, value, value, value, value, value, value, value, value, value, value, valueFromObject, valueFromObject, variance, writeAlias, writeField, writeFields
-
Field Details
-
table
-
-
Constructor Details
-
TableExpression
public TableExpression() -
TableExpression
-
-
Method Details
-
assignAlias
INTERNAL: Alias a particular table within this node- Overrides:
assignAliasin classDataExpression
-
equals
INTERNAL: Return if the expression is equal to the other. This is used to allow dynamic expression's SQL to be cached.- Overrides:
equalsin classDataExpression
-
computeHashCode
public int computeHashCode()INTERNAL: Compute a consistent hash-code for the expression. This is used to allow dynamic expression's SQL to be cached.- Overrides:
computeHashCodein classExpression
-
descriptionOfNodeType
INTERNAL: Used for debug printing.- Overrides:
descriptionOfNodeTypein classExpression
-
getField
INTERNAL: Fully-qualify the databaseField if the table is known. CR 3791- Overrides:
getFieldin classDataExpression
-
getOwnedTables
INTERNAL:- Overrides:
getOwnedTablesin classExpression
-
getTable
-
isTableExpression
public boolean isTableExpression()Description copied from class:ExpressionINTERNAL:- Overrides:
isTableExpressionin classExpression
-
normalize
INTERNAL: Normalize the expression into a printable structure. Any joins must be added to form a new root.- Overrides:
normalizein classDataExpression
-
rebuildOn
INTERNAL: This expression is built on a different base than the one we want. Rebuild it and return the root of the new tree- Specified by:
rebuildOnin classExpression- See Also:
-
setTable
INTERNAL: Added for temporal querying. -
twistedForBaseAndContext
public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase) 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"- Overrides:
twistedForBaseAndContextin classExpression
-
writeDescriptionOn
INTERNAL: Used to print a debug form of the expression tree.- Overrides:
writeDescriptionOnin classExpression- Throws:
IOException
-