Class Reference
- java.lang.Object
-
- org.eclipse.persistence.internal.oxm.Reference
-
public class Reference extends Object
INTERNAL:Purpose: Holds mapping reference info. The info held in this class will be used after unmarshal to resolve 1-1 and 1-M mapping references. This is necessary to ensure that all related objects have been created before attempting to set instance values in related objects.
-
-
Field Summary
Fields Modifier and Type Field Description protected Mapping
mapping
protected Object
primaryKey
protected HashMap
primaryKeyMap
protected Object
sourceObject
protected Class
targetClass
-
Constructor Summary
Constructors Constructor Description Reference(Mapping mapping, Object source, Class target, Object primaryKey)
Constructor typically used in the single case.Reference(Mapping mapping, Object source, Class target, HashMap primaryKeyMap, Object container)
Constructor typically used in the collection case.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getContainer()
Get the container this reference should be added to if it was from a collection mappingMapping
getMapping()
Return the XMLMapping associated with this reference.Object
getPrimaryKey()
Return the list of primary key values required to lookup the reference class in the cache.HashMap
getPrimaryKeyMap()
Return the map of primary key/values required to lookup the reference class in the cache.Setting
getSetting()
Object
getSourceObject()
Return the source object for this reference.Class
getTargetClass()
Return the target (reference) class for this reference.void
setPrimaryKey(Object primaryKey)
Set the primary key value required to lookup the reference class in the cache.void
setSetting(Setting setting)
-
-
-
Method Detail
-
getContainer
public Object getContainer()
Get the container this reference should be added to if it was from a collection mapping- Returns:
-
getSetting
public Setting getSetting()
-
setSetting
public void setSetting(Setting setting)
-
getMapping
public Mapping getMapping()
Return the XMLMapping associated with this reference.- Returns:
-
getPrimaryKeyMap
public HashMap getPrimaryKeyMap()
Return the map of primary key/values required to lookup the reference class in the cache.- Returns:
-
getPrimaryKey
public Object getPrimaryKey()
Return the list of primary key values required to lookup the reference class in the cache.- Returns:
-
getSourceObject
public Object getSourceObject()
Return the source object for this reference.- Returns:
-
getTargetClass
public Class getTargetClass()
Return the target (reference) class for this reference.- Returns:
-
setPrimaryKey
public void setPrimaryKey(Object primaryKey)
Set the primary key value required to lookup the reference class in the cache.
-
-