Top Description Fields Constructors Methods
org.eclipse.persistence.mappings.querykeys

public Class ForeignReferenceQueryKey

extends QueryKey
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.mappings.querykeys.ManyToManyQueryKey, org.eclipse.persistence.mappings.querykeys.OneToManyQueryKey, org.eclipse.persistence.mappings.querykeys.OneToOneQueryKey, org.eclipse.persistence.mappings.querykeys.DirectCollectionQueryKey
Imports
java.security.AccessController, .PrivilegedActionException, java.util.Collection, .HashSet, .Iterator, org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.expressions.*, org.eclipse.persistence.internal.expressions.DataExpression, .ExpressionIterator, .ParameterExpression, .TableExpression, org.eclipse.persistence.internal.helper.DatabaseField, .DatabaseTable, org.eclipse.persistence.internal.security.PrivilegedAccessHelper, .PrivilegedClassForName

Purpose: Define an alias to a foreign object.

Responsibilities:

Field Summary

Modifier and TypeField and Description
protected Expression
protected Class<?>
protected String
Inherited from org.eclipse.persistence.mappings.querykeys.QueryKey:
descriptorname

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
convertClassNamesToClasses(ClassLoader classLoader)

Overrides org.eclipse.persistence.mappings.querykeys.QueryKey.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings
public Expression
getJoinCriteria()

PUBLIC: Return the join expression for the relationship defined by the query key.

public Class<?>
getReferenceClass()

PUBLIC: Return the reference class of the relationship.

public String
getReferenceClassName()

PUBLIC: Return the reference class name of the relationship.

public DatabaseTable
getReferenceTable(ClassDescriptor desc)

PUBLIC: Returns the reference table.

public DatabaseTable
getRelationTable(ClassDescriptor referenceDescriptor)

PUBLIC: Returns the relation table.

public DatabaseTable
getSourceTable()

PUBLIC: Returns the source table.

public boolean

Returns:

boolean
isForeignReferenceQueryKey
()

Overrides org.eclipse.persistence.mappings.querykeys.QueryKey.isForeignReferenceQueryKey.

INTERNAL: override the isForeignReferenceQueryKey() method in the superclass to return true.
public void
setJoinCriteria(Expression joinCriteria)

PUBLIC: Set the join expression for the relationship defined by the query key.

public void
setReferenceClass(Class<?> referenceClass)

PUBLIC: Set the reference class of the relationship.

public void
setReferenceClassName(String referenceClassName)

PUBLIC: Set the reference class name for this relationship This is used when projects are built without using classes

Inherited from org.eclipse.persistence.mappings.querykeys.QueryKey:
clonegetDescriptorgetNameinitializeisAbstractQueryKeyisCollectionQueryKeyisDirectCollectionQueryKeyisDirectQueryKeyisManyToManyQueryKeyisOneToManyQueryKeyisOneToOneQueryKeyisQueryKeysetDescriptorsetNametoString

Field Detail

joinCriteriaback to summary
protected Expression joinCriteria
referenceClassback to summary
protected Class<?> referenceClass
referenceClassNameback to summary
protected String referenceClassName

Constructor Detail

ForeignReferenceQueryKeyback to summary
public ForeignReferenceQueryKey()

Method Detail

convertClassNamesToClassesback to summary
public void convertClassNamesToClasses(ClassLoader classLoader)

Overrides org.eclipse.persistence.mappings.querykeys.QueryKey.convertClassNamesToClasses.

INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings

Annotations
@Override
getJoinCriteriaback to summary
public Expression getJoinCriteria()

PUBLIC: Return the join expression for the relationship defined by the query key.

getReferenceClassback to summary
public Class<?> getReferenceClass()

PUBLIC: Return the reference class of the relationship.

getReferenceClassNameback to summary
public String getReferenceClassName()

PUBLIC: Return the reference class name of the relationship.

getReferenceTableback to summary
public DatabaseTable getReferenceTable(ClassDescriptor desc)

PUBLIC: Returns the reference table.

getRelationTableback to summary
public DatabaseTable getRelationTable(ClassDescriptor referenceDescriptor)

PUBLIC: Returns the relation table. Currently only ManyToMany and OneToOne may have relation table. The method is overridden to return null for other subclasses. The returned relationTable still could be null.

getSourceTableback to summary
public DatabaseTable getSourceTable()

PUBLIC: Returns the source table.

isForeignReferenceQueryKeyback to summary
public boolean isForeignReferenceQueryKey()

Overrides org.eclipse.persistence.mappings.querykeys.QueryKey.isForeignReferenceQueryKey.

INTERNAL: override the isForeignReferenceQueryKey() method in the superclass to return true.

Returns:boolean

boolean

Annotations
@Override
setJoinCriteriaback to summary
public void setJoinCriteria(Expression joinCriteria)

PUBLIC: Set the join expression for the relationship defined by the query key.

Example:

    builder.getField("ADDRESS.ADDRESS_ID").equal(builder.getParameter("EMPLOYEE.ADDR_ID");
setReferenceClassback to summary
public void setReferenceClass(Class<?> referenceClass)

PUBLIC: Set the reference class of the relationship. This is not required for direct collection query keys.

setReferenceClassNameback to summary
public void setReferenceClassName(String referenceClassName)

PUBLIC: Set the reference class name for this relationship This is used when projects are built without using classes