EclipseLink 2.3.2, build 'v20111125-r10461' API Reference

org.eclipse.persistence.mappings.querykeys
Class ForeignReferenceQueryKey

java.lang.Object
  extended by org.eclipse.persistence.mappings.querykeys.QueryKey
      extended by org.eclipse.persistence.mappings.querykeys.ForeignReferenceQueryKey
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
DirectCollectionQueryKey, ManyToManyQueryKey, OneToManyQueryKey, OneToOneQueryKey

public class ForeignReferenceQueryKey
extends QueryKey

Purpose: Define an alias to a foreign object.

Responsibilities:

See Also:
Serialized Form

Field Summary
protected  Expression joinCriteria
           
protected  java.lang.Class referenceClass
           
protected  java.lang.String referenceClassName
           
 
Fields inherited from class org.eclipse.persistence.mappings.querykeys.QueryKey
descriptor, name
 
Constructor Summary
ForeignReferenceQueryKey()
           
 
Method Summary
 void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
          INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings
 Expression getJoinCriteria()
          PUBLIC: Return the join expression for the relationship defined by the query key.
 java.lang.Class getReferenceClass()
          PUBLIC: Return the reference class of the relationship.
 java.lang.String getReferenceClassName()
          PUBLIC: Return the reference class name of the relationship.
 org.eclipse.persistence.internal.helper.DatabaseTable getReferenceTable(ClassDescriptor desc)
          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 getSourceTable()
          PUBLIC: Returns the source table.
 boolean isForeignReferenceQueryKey()
          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(java.lang.Class referenceClass)
          PUBLIC: Set the reference class of the relationship.
 void setReferenceClassName(java.lang.String referenceClassName)
          PUBLIC: Set the reference class name for this relationship This is used when projects are built without using classes
 
Methods inherited from class org.eclipse.persistence.mappings.querykeys.QueryKey
clone, getDescriptor, getName, initialize, isAbstractQueryKey, isCollectionQueryKey, isDirectCollectionQueryKey, isDirectQueryKey, isManyToManyQueryKey, isOneToManyQueryKey, isOneToOneQueryKey, isQueryKey, setDescriptor, setName, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

referenceClass

protected java.lang.Class referenceClass

referenceClassName

protected java.lang.String referenceClassName

joinCriteria

protected Expression joinCriteria
Constructor Detail

ForeignReferenceQueryKey

public ForeignReferenceQueryKey()
Method Detail

convertClassNamesToClasses

public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this project to actual class-based settings

Overrides:
convertClassNamesToClasses in class QueryKey
Parameters:
classLoader -

getJoinCriteria

public Expression getJoinCriteria()
PUBLIC: Return the join expression for the relationship defined by the query key.


getReferenceClass

public java.lang.Class getReferenceClass()
PUBLIC: Return the reference class of the relationship.


getReferenceClassName

public java.lang.String 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 class QueryKey
Returns:
boolean

setJoinCriteria

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");


setReferenceClass

public void setReferenceClass(java.lang.Class referenceClass)
PUBLIC: Set the reference class of the relationship. This is not required for direct collection query keys.


setReferenceClassName

public void setReferenceClassName(java.lang.String referenceClassName)
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.


EclipseLink 2.3.2, build 'v20111125-r10461' API Reference