Class FromSubSelectExpression
- 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
-
- org.eclipse.persistence.internal.expressions.FromSubSelectExpression
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class FromSubSelectExpression extends TableExpression
Allow a table expression to be created on a sub-select to define a sub-select in the from clause.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SubSelectExpressionsubSelectAllows a sub-select to be defined from clause.-
Fields inherited from class org.eclipse.persistence.internal.expressions.TableExpression
table
-
Fields inherited from class org.eclipse.persistence.internal.expressions.DataExpression
asOfClause, derivedFields, derivedTables, hasBeenNormalized, tableAliases
-
Fields inherited from class org.eclipse.persistence.internal.expressions.BaseExpression
baseExpression, builder
-
Fields inherited from class org.eclipse.persistence.expressions.Expression
currentAlias, hashCode, lastTable, selectIfOrderedBy, shouldUseUpperCaseForIgnoreCase
-
-
Constructor Summary
Constructors Constructor Description FromSubSelectExpression()FromSubSelectExpression(SubSelectExpression subSelect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatabaseTablealiasForTable(DatabaseTable table)INTERNAL: Any table should use the sub-selects alias.intcomputeHashCode()INTERNAL: Compute a consistent hash-code for the expression.java.lang.StringdescriptionOfNodeType()INTERNAL: Used for debug printing.booleanequals(java.lang.Object object)INTERNAL: Return if the expression is equal to the other.Expressionget(java.lang.String alias)This is used by sub-selects in the from clause to define a virtual table, 'get' allows one of the sub-selected attributes to be aliased without using the field name.SubSelectExpressiongetSubSelect()voiditerateOn(ExpressionIterator iterator)INTERNAL: Also iterate over the sub-select if present.Expressionnormalize(ExpressionNormalizer normalizer)INTERNAL: Normalize the expression into a printable structure.protected voidpostCopyIn(java.util.Map alreadyDone)INTERNAL: Also copy over the sub-select if present.ExpressionrebuildOn(Expression newBase)INTERNAL: This expression is built on a different base than the one we want.voidsetSubSelect(SubSelectExpression subSelect)ExpressiontwistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression.voidwriteDescriptionOn(java.io.BufferedWriter writer)INTERNAL: Used to print a debug form of the expression tree.-
Methods inherited from class org.eclipse.persistence.internal.expressions.TableExpression
assignAlias, getField, getOwnedTables, getTable, isTableExpression, setTable
-
Methods inherited from class org.eclipse.persistence.internal.expressions.DataExpression
addDerivedField, addDerivedTable, 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, newDerivedField, newDerivedTable, printSQL, setHasBeenNormalized, setTableAliases, tableAliasesDescription, writeSubexpressionsTo
-
Methods inherited from class org.eclipse.persistence.internal.expressions.BaseExpression
getBaseExpression, getBuilder, resetPlaceHolderBuilder, setBaseExpression, shallowClone
-
Methods 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, 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, 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, getAllowingNull, getAsOfClauseRecursively, getClonedField, getFields, getFieldValue, getFunction, getFunction, getFunction, getFunction, getFunction, getFunctionWithArguments, 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, 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, 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 Detail
-
subSelect
protected SubSelectExpression subSelect
Allows a sub-select to be defined from clause.
-
-
Constructor Detail
-
FromSubSelectExpression
public FromSubSelectExpression()
-
FromSubSelectExpression
public FromSubSelectExpression(SubSelectExpression subSelect)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object object)
INTERNAL: Return if the expression is equal to the other. This is used to allow dynamic expression's SQL to be cached. From sub-selects are too complex to cache, so use identity.- Overrides:
equalsin classTableExpression
-
computeHashCode
public int computeHashCode()
INTERNAL: Compute a consistent hash-code for the expression.- Overrides:
computeHashCodein classTableExpression
-
descriptionOfNodeType
public java.lang.String descriptionOfNodeType()
INTERNAL: Used for debug printing.- Overrides:
descriptionOfNodeTypein classTableExpression
-
get
public Expression get(java.lang.String alias)
This is used by sub-selects in the from clause to define a virtual table, 'get' allows one of the sub-selected attributes to be aliased without using the field name.- Overrides:
getin classExpression
-
normalize
public Expression normalize(ExpressionNormalizer normalizer)
INTERNAL: Normalize the expression into a printable structure. Any joins must be added to form a new root.- Overrides:
normalizein classTableExpression
-
iterateOn
public void iterateOn(ExpressionIterator iterator)
INTERNAL: Also iterate over the sub-select if present.- Overrides:
iterateOnin classDataExpression
-
postCopyIn
protected void postCopyIn(java.util.Map alreadyDone)
INTERNAL: Also copy over the sub-select if present.- Overrides:
postCopyInin classDataExpression
-
rebuildOn
public Expression rebuildOn(Expression newBase)
INTERNAL: This expression is built on a different base than the one we want. Rebuild it and return the root of the new tree- Overrides:
rebuildOnin classTableExpression- See Also:
Expression.cloneUsing(Expression newBase)
-
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 classTableExpression
-
writeDescriptionOn
public void writeDescriptionOn(java.io.BufferedWriter writer) throws java.io.IOExceptionINTERNAL: Used to print a debug form of the expression tree.- Overrides:
writeDescriptionOnin classTableExpression- Throws:
java.io.IOException
-
aliasForTable
public DatabaseTable aliasForTable(DatabaseTable table)
INTERNAL: Any table should use the sub-selects alias.- Overrides:
aliasForTablein classDataExpression
-
getSubSelect
public SubSelectExpression getSubSelect()
-
setSubSelect
public void setSubSelect(SubSelectExpression subSelect)
-
-