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

public Class TableExpression

extends DataExpression
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.expressions.FromSubSelectExpression
Imports
java.io.*, java.util.*, org.eclipse.persistence.internal.helper.*, org.eclipse.persistence.expressions.*

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.

Field Summary

Modifier and TypeField and Description
protected DatabaseTable
Inherited from org.eclipse.persistence.internal.expressions.DataExpression:
asOfClausederivedFieldsderivedTableshasBeenNormalizedtableAliases

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
protected void
assignAlias(DatabaseTable alias, DatabaseTable table)

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

INTERNAL: Alias a particular table within this node
public int
computeHashCode()

Overrides org.eclipse.persistence.expressions.Expression.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.DataExpression.equals.

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

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

INTERNAL: Fully-qualify the databaseField if the table is known.
public List<DatabaseTable>
public DatabaseTable
public boolean
public Expression
normalize(ExpressionNormalizer normalizer)

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

INTERNAL: Normalize the expression into a printable structure.
public Expression
rebuildOn(Expression newBase)

Implements abstract org.eclipse.persistence.expressions.Expression.rebuildOn.

INTERNAL: This expression is built on a different base than the one we want.
public void
setTable(DatabaseTable table)

INTERNAL: Added for temporal querying.

public Expression
twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

Overrides org.eclipse.persistence.expressions.Expression.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.expressions.Expression.writeDescriptionOn.

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

Field Detail

tableback to summary
protected DatabaseTable table

Constructor Detail

TableExpressionback to summary
public TableExpression()
TableExpressionback to summary
public TableExpression(DatabaseTable table)

Method Detail

assignAliasback to summary
protected void assignAlias(DatabaseTable alias, DatabaseTable table)

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

INTERNAL: Alias a particular table within this node

Annotations
@Override
computeHashCodeback to summary
public int computeHashCode()

Overrides org.eclipse.persistence.expressions.Expression.computeHashCode.

INTERNAL: Compute a consistent hash-code for the expression. This is used to allow dynamic expression's SQL to be cached.

Annotations
@Override
descriptionOfNodeTypeback to summary
public String descriptionOfNodeType()

Overrides org.eclipse.persistence.expressions.Expression.descriptionOfNodeType.

INTERNAL: Used for debug printing.

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

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

INTERNAL: Return if the expression is equal to the other. This is used to allow dynamic expression's SQL to be cached.

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
getFieldback to summary
public Expression getField(String fieldName)

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

INTERNAL: Fully-qualify the databaseField if the table is known. CR 3791

Annotations
@Override
getOwnedTablesback to summary
public List<DatabaseTable> getOwnedTables()

Overrides org.eclipse.persistence.expressions.Expression.getOwnedTables.

INTERNAL:

Annotations
@Override
getTableback to summary
public DatabaseTable getTable()
isTableExpressionback to summary
public boolean isTableExpression()

Overrides org.eclipse.persistence.expressions.Expression.isTableExpression.

Doc from org.eclipse.persistence.expressions.Expression.isTableExpression.

INTERNAL:

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

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

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

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

Implements abstract org.eclipse.persistence.expressions.Expression.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
setTableback to summary
public void setTable(DatabaseTable table)

INTERNAL: Added for temporal querying.

twistedForBaseAndContextback to summary
public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

Overrides org.eclipse.persistence.expressions.Expression.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.expressions.Expression.writeDescriptionOn.

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

Annotations
@Override