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

public Class ManualQueryKeyExpression

extends QueryKeyExpression
Class Inheritance
Imports
java.util.*, org.eclipse.persistence.internal.helper.DatabaseTable, org.eclipse.persistence.mappings.querykeys.*, org.eclipse.persistence.expressions.*, org.eclipse.persistence.descriptors.ClassDescriptor

This class represents a "query key" that isn't really there in the descriptors. For example, I could use this to create an 'employee' query key from an 'address' node even if addresses don't know their employee. It's called manual, because I will have to provide the relevant join criteria myself (normally based on a reverse relationship. Motivated by batch reading.

Field Summary

Inherited from org.eclipse.persistence.internal.expressions.QueryKeyExpression:
aliasedFieldhasMappinghasQueryKeyindexisAttributeExpressionisClonedForSubQuerymappingnamequeryKeyshouldQueryToManyRelationship

Constructor Summary

AccessConstructor and Description
public
public
ManualQueryKeyExpression(String impliedRelationshipName, Expression base)

public
ManualQueryKeyExpression(String impliedRelationshipName, Expression base, ClassDescriptor descriptor)

Method Summary

Modifier and TypeMethod and Description
public String
public boolean
equals(Object
the reference object with which to compare.
object
)

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

INTERNAL: Return if the expression is equal to the other.
public List<DatabaseTable>
getOwnedTables()

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.getOwnedTables.

INTERNAL: If we ever get in the circumstance of a manual query key to an aggregate, then we can assume that the owner of that aggregate isn't participating (and even if it is, we can't know which node it is, so *DO* use the aggregate's parents tables
public QueryKey
public boolean
isAttribute()

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.isAttribute.

INTERNAL: We can never be an attribute, we're always a join
public Expression
public Expression
rebuildOn(Expression newBase)

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

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

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

INTERNAL: Rebuild myself against the base, with the values of parameters supplied by the context expression.
public void
Inherited from org.eclipse.persistence.internal.expressions.QueryKeyExpression:
additionalExpressionCriteriaadditionalExpressionCriteriaMapaliasForTablecheckJoinForSubSelectWithParentcomputeHashCodedoQueryToManyRelationshipgetAdditionalTablesgetAliasedFieldgetAliasedTablegetFieldgetFieldsgetFieldValuegetLeafDescriptorgetLeafMappinggetMapKeyDescriptorgetMappinggetMappingFromQueryKeygetNamegetNestedAttributeNamegetReferenceTablegetRelationTablegetSelectionFieldsgetSourceTableindexinitializeAliasedFieldisDirectCollectionisManyToManyisMapKeyObjectRelationshipisOneToManyisOneToOneisQueryKeyExpressionnormalizenormalizepostCopyInprintJavaprintSQLrebuildOnresetCacheshouldQueryToManyRelationshiptreatvalueFromObjectvaluesFromCollectionwriteDescriptionOn

Constructor Detail

ManualQueryKeyExpressionback to summary
public ManualQueryKeyExpression()
ManualQueryKeyExpressionback to summary
public ManualQueryKeyExpression(String impliedRelationshipName, Expression base)
ManualQueryKeyExpressionback to summary
public ManualQueryKeyExpression(String impliedRelationshipName, Expression base, ClassDescriptor descriptor)

Method Detail

descriptionOfNodeTypeback to summary
public String descriptionOfNodeType()

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

INTERNAL: Used for debug printing.

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

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.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
getOwnedTablesback to summary
public List<DatabaseTable> getOwnedTables()

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.getOwnedTables.

INTERNAL: If we ever get in the circumstance of a manual query key to an aggregate, then we can assume that the owner of that aggregate isn't participating (and even if it is, we can't know which node it is, so *DO* use the aggregate's parents tables

Annotations
@Override
getQueryKeyOrNullback to summary
public QueryKey getQueryKeyOrNull()

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.getQueryKeyOrNull.

Annotations
@Override
isAttributeback to summary
public boolean isAttribute()

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.isAttribute.

INTERNAL: We can never be an attribute, we're always a join

Annotations
@Override
mappingCriteriaback to summary
public Expression mappingCriteria(Expression base)

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.mappingCriteria.

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

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.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
twistedForBaseAndContextback to summary
public Expression twistedForBaseAndContext(Expression newBase, Expression context, Expression oldBase)

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.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
validateNodeback to summary
public void validateNode()

Overrides org.eclipse.persistence.internal.expressions.QueryKeyExpression.validateNode.

Do any required validation for this node. Throw an exception if it's incorrect.

Annotations
@Override