org.apache.jdo.impl.model.jdo
Class UnresolvedRelationshipHelper
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.apache.jdo.impl.model.jdo.UnresolvedRelationshipHelper
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- class UnresolvedRelationshipHelper
- extends java.util.HashMap
A helper class to manage unresolved relationship information.
The class maps the mappedBy name to all JDOField instances using this name
(which might denote fields from different classes) as the mapped by name.
To ease the access the list of JDOField instances is organized as a map
using the declaring JDOClass as key.
Nested classes inherited from class java.util.HashMap |
|
Nested classes inherited from class java.util.AbstractMap |
|
Fields inherited from class java.util.HashMap |
|
Fields inherited from class java.util.AbstractMap |
|
Method Summary |
void |
register(java.lang.String mappedByName,
JDOField jdoField)
Stores an unresolved relationship entry. |
void |
remove(java.lang.String mappedByName,
JDOField jdoField)
Removes the specified JDOField from this unresolved relationship
helper. |
JDOField |
resolve(java.lang.String mappedByName,
JDOClass jdoClass)
Look for a JDOField in the unresolved relationship entry having the
specified mappedByName as its mappedBy name. |
Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
equals, hashCode |
UnresolvedRelationshipHelper
UnresolvedRelationshipHelper()
register
public void register(java.lang.String mappedByName,
JDOField jdoField)
- Stores an unresolved relationship entry. The specified JDOField uses
the specified field name in its mappedBy clause. The specified
mappedByName denotes the field on the owning side of the relationship.
- Parameters:
mappedByName
- the field name used in the mappedBy clause.jdoField
- the jdoField instance using the specified field name as
its mappedBy name.
resolve
public JDOField resolve(java.lang.String mappedByName,
JDOClass jdoClass)
- Look for a JDOField in the unresolved relationship entry having the
specified mappedByName as its mappedBy name. The JDOField must be
declared by the specified jdoClass instance. This allows the owning
side to find the JDOField using the name of the owning side in its
mappedBy clause.
- Parameters:
mappedByName
- the field name used as mappedBy name.jdoClass
- the declaring JDOClass of the field to be returned.
- Returns:
- a JDOField declared by the specified jdoClass using the
specified mappedByName as its mappedBy name.
remove
public void remove(java.lang.String mappedByName,
JDOField jdoField)
- Removes the specified JDOField from this unresolved relationship
helper.
- Parameters:
mappedByName
- the field name used in the mappedBy clause.jdoField
- the jdoField instance using the specified field name as
its mappedBy name.