Class ForeignReferenceQueryKey
java.lang.Object
org.eclipse.persistence.mappings.querykeys.QueryKey
org.eclipse.persistence.mappings.querykeys.ForeignReferenceQueryKey
- All Implemented Interfaces:
Serializable
,Cloneable
- Direct Known Subclasses:
DirectCollectionQueryKey
,ManyToManyQueryKey
,OneToManyQueryKey
,OneToOneQueryKey
Purpose: Define an alias to a foreign object.
Responsibilities:
- Define the reference class of the foreign object.
- See Also:
-
Field Summary
Fields inherited from class org.eclipse.persistence.mappings.querykeys.QueryKey
descriptor, name
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
convertClassNamesToClasses
(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this project to actual class-based settingsPUBLIC: Return the join expression for the relationship defined by the query key.PUBLIC: Return the reference class of the relationship.PUBLIC: Return the reference class name of the relationship.org.eclipse.persistence.internal.helper.DatabaseTable
PUBLIC: Returns the reference table.org.eclipse.persistence.internal.helper.DatabaseTable
getRelationTable
(ClassDescriptor referenceDescriptor) PUBLIC: Returns the relation table.org.eclipse.persistence.internal.helper.DatabaseTable
PUBLIC: Returns the source table.boolean
INTERNAL: override the isForeignReferenceQueryKey() method in the superclass to return true.void
setJoinCriteria
(Expression joinCriteria) PUBLIC: Set the join expression for the relationship defined by the query key.void
setReferenceClass
(Class referenceClass) PUBLIC: Set the reference class of the relationship.void
setReferenceClassName
(String referenceClassName) PUBLIC: Set the reference class name for this relationship This is used when projects are built without using classesMethods inherited from class org.eclipse.persistence.mappings.querykeys.QueryKey
clone, getDescriptor, getName, initialize, isAbstractQueryKey, isCollectionQueryKey, isDirectCollectionQueryKey, isDirectQueryKey, isManyToManyQueryKey, isOneToManyQueryKey, isOneToOneQueryKey, isQueryKey, setDescriptor, setName, toString
-
Field Details
-
referenceClass
-
referenceClassName
-
joinCriteria
-
-
Constructor Details
-
ForeignReferenceQueryKey
public ForeignReferenceQueryKey()
-
-
Method Details
-
convertClassNamesToClasses
INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings- Overrides:
convertClassNamesToClasses
in classQueryKey
- Parameters:
classLoader
-
-
getJoinCriteria
PUBLIC: Return the join expression for the relationship defined by the query key. -
getReferenceClass
PUBLIC: Return the reference class of the relationship. -
getReferenceClassName
PUBLIC: Return the reference class name of the relationship. -
isForeignReferenceQueryKey
public boolean isForeignReferenceQueryKey()INTERNAL: override the isForeignReferenceQueryKey() method in the superclass to return true.- Overrides:
isForeignReferenceQueryKey
in classQueryKey
- Returns:
- boolean
-
setJoinCriteria
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");
-
setReferenceClass
PUBLIC: Set the reference class of the relationship. This is not required for direct collection query keys. -
setReferenceClassName
PUBLIC: Set the reference class name for this relationship This is used when projects are built without using classes- Parameters:
referenceClassName
-
-
getSourceTable
public org.eclipse.persistence.internal.helper.DatabaseTable getSourceTable()PUBLIC: Returns the source table. -
getReferenceTable
public org.eclipse.persistence.internal.helper.DatabaseTable getReferenceTable(ClassDescriptor desc) PUBLIC: Returns the reference table. -
getRelationTable
public org.eclipse.persistence.internal.helper.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.
-