Top Description Fields Constructors Methods
org.eclipse.persistence.internal.expressions

public Class FromSubSelectExpression

extends TableExpression
Class Inheritance
Imports
java.io.*, java.util.*, org.eclipse.persistence.expressions.*, org.eclipse.persistence.internal.helper.DatabaseTable, org.eclipse.persistence.internal.queries.ReportItem

Allow a table expression to be created on a sub-select to define a sub-select in the from clause.

Field Summary

Modifier and TypeField and Description
protected SubSelectExpression
subSelect

Allows a sub-select to be defined from clause.

Inherited from org.eclipse.persistence.internal.expressions.TableExpression:
table

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public DatabaseTable
aliasForTable(DatabaseTable table)

Overrides org.eclipse.persistence.internal.expressions.DataExpression.aliasForTable.

INTERNAL: Any table should use the sub-selects alias.
public int
computeHashCode()

Overrides org.eclipse.persistence.internal.expressions.TableExpression.computeHashCode.

INTERNAL: Compute a consistent hash-code for the expression.
public String
public boolean
equals(Object
the reference object with which to compare.
object
)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.equals.

INTERNAL: Return if the expression is equal to the other.
public Expression
get(String alias)

Overrides org.eclipse.persistence.expressions.Expression.get.

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.
public SubSelectExpression
public void
iterateOn(ExpressionIterator iterator)

Overrides org.eclipse.persistence.internal.expressions.DataExpression.iterateOn.

INTERNAL: Also iterate over the sub-select if present.
public Expression
normalize(ExpressionNormalizer normalizer)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.normalize.

INTERNAL: Normalize the expression into a printable structure.
protected void
postCopyIn(Map<K, V> alreadyDone)

Overrides org.eclipse.persistence.internal.expressions.DataExpression.postCopyIn.

INTERNAL: Also copy over the sub-select if present.
public Expression
rebuildOn(Expression newBase)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.rebuildOn.

INTERNAL: This expression is built on a different base than the one we want.
public void
public Expression
twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.twistedForBaseAndContext.

INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression.
public void
writeDescriptionOn(BufferedWriter writer)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.writeDescriptionOn.

INTERNAL: Used to print a debug form of the expression tree.
Inherited from org.eclipse.persistence.internal.expressions.TableExpression:
assignAliasgetFieldgetOwnedTablesgetTableisTableExpressionsetTable

Field Detail

subSelectback to summary
protected SubSelectExpression subSelect

Allows a sub-select to be defined from clause.

Constructor Detail

FromSubSelectExpressionback to summary
public FromSubSelectExpression()
FromSubSelectExpressionback to summary
public FromSubSelectExpression(SubSelectExpression subSelect)

Method Detail

aliasForTableback to summary
public DatabaseTable aliasForTable(DatabaseTable table)

Overrides org.eclipse.persistence.internal.expressions.DataExpression.aliasForTable.

INTERNAL: Any table should use the sub-selects alias.

Annotations
@Override
computeHashCodeback to summary
public int computeHashCode()

Overrides org.eclipse.persistence.internal.expressions.TableExpression.computeHashCode.

INTERNAL: Compute a consistent hash-code for the expression.

Annotations
@Override
descriptionOfNodeTypeback to summary
public String descriptionOfNodeType()

Overrides org.eclipse.persistence.internal.expressions.TableExpression.descriptionOfNodeType.

INTERNAL: Used for debug printing.

Annotations
@Override
equalsback to summary
public boolean equals(Object object)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.equals.

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.

Parameters
object:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getback to summary
public Expression get(String alias)

Overrides org.eclipse.persistence.expressions.Expression.get.

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.

Annotations
@Override
getSubSelectback to summary
public SubSelectExpression getSubSelect()
iterateOnback to summary
public void iterateOn(ExpressionIterator iterator)

Overrides org.eclipse.persistence.internal.expressions.DataExpression.iterateOn.

INTERNAL: Also iterate over the sub-select if present.

Annotations
@Override
normalizeback to summary
public Expression normalize(ExpressionNormalizer normalizer)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.normalize.

INTERNAL: Normalize the expression into a printable structure. Any joins must be added to form a new root.

Annotations
@Override
postCopyInback to summary
protected void postCopyIn(Map<K, V> alreadyDone)

Overrides org.eclipse.persistence.internal.expressions.DataExpression.postCopyIn.

INTERNAL: Also copy over the sub-select if present.

Annotations
@Override
rebuildOnback to summary
public Expression rebuildOn(Expression newBase)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.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

Annotations
@Override
setSubSelectback to summary
public void setSubSelect(SubSelectExpression subSelect)
twistedForBaseAndContextback to summary
public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

Overrides org.eclipse.persistence.internal.expressions.TableExpression.twistedForBaseAndContext.

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"

Annotations
@Override
writeDescriptionOnback to summary
public void writeDescriptionOn(BufferedWriter writer) throws IOException

Overrides org.eclipse.persistence.internal.expressions.TableExpression.writeDescriptionOn.

INTERNAL: Used to print a debug form of the expression tree.

Annotations
@Override