- 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 Mappingmappingprotected ObjectprimaryKeyprotected HashMapprimaryKeyMapprotected ObjectsourceObjectprotected 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 ObjectgetContainer()Get the container this reference should be added to if it was from a collection mappingMappinggetMapping()Return the XMLMapping associated with this reference.ObjectgetPrimaryKey()Return the list of primary key values required to lookup the reference class in the cache.HashMapgetPrimaryKeyMap()Return the map of primary key/values required to lookup the reference class in the cache.SettinggetSetting()ObjectgetSourceObject()Return the source object for this reference.Class<?>getTargetClass()Return the target (reference) class for this reference.voidsetPrimaryKey(Object primaryKey)Set the primary key value required to lookup the reference class in the cache.voidsetSetting(Setting setting)
-
-
-
Method Detail
-
getContainer
public Object getContainer()
Get the container this reference should be added to if it was from a collection mapping
-
getSetting
public Setting getSetting()
-
setSetting
public void setSetting(Setting setting)
-
getMapping
public Mapping getMapping()
Return the XMLMapping associated with this reference.
-
getPrimaryKeyMap
public HashMap getPrimaryKeyMap()
Return the map of primary key/values required to lookup the reference class in the cache.
-
getPrimaryKey
public Object getPrimaryKey()
Return the list of primary key values required to lookup the reference class in the cache.
-
getSourceObject
public Object getSourceObject()
Return the source object for this reference.
-
getTargetClass
public Class<?> getTargetClass()
Return the target (reference) class for this reference.
-
setPrimaryKey
public void setPrimaryKey(Object primaryKey)
Set the primary key value required to lookup the reference class in the cache.
-
-