Purpose: A MapContainerPolicy is ContainerPolicy whose container class implements the Map interface.
Responsibilities: Provide the functionality to operate on an instance of a Map.
ContainerPolicy, CollectionContainerPolicy
| Modifier and Type | Class and Description |
|---|---|
| public static class | MapContainerPolicy.MapContainerPolicyIterator
INTERNAL: This inner class is used to iterate through the Map.Entry s of a Map. |
| Modifier and Type | Field and Description |
|---|---|
| protected Class | |
| protected String | |
| protected transient Field | |
| protected transient Method | |
| protected String | keyName
The Method which is called on each value added to the Map and whose result is used as key to the value. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | MapContainerPolicy(Class<?> containerClass)
INTERNAL: Construct a new policy for the specified class. |
| public | MapContainerPolicy(String containerClassName)
INTERNAL: Construct a new policy for the specified class name. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | addInto(Object element, Object container, AbstractSession session)
Overrides org. Implements org. |
| public boolean | addInto(Object key, Object element, Object container, AbstractSession session)
Overrides org. Implements org. |
| public void | addNextValueFromIteratorInto(Object valuesIterator, Object parent, CacheKey parentCacheKey, Object toCollection, CollectionMapping mapping, Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)
Overrides org. |
| public void | buildChangeSetForNewObjectInCollection(Object object, ClassDescriptor referenceDescriptor, UnitOfWorkChangeSet uowChangeSet, AbstractSession session)
Overrides org. |
| protected Object | buildCloneForValue(Object value, Object parent, CacheKey parentCacheKey, CollectionMapping mapping, Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)
Build a clone for the value in a mapping. |
| public Object | buildCollectionEntry(Object objectAdded, ObjectChangeSet changeSet)
Overrides org. |
| public Object[] | buildReferencesPKList(Object container, AbstractSession session)
Overrides org. |
| public void | clear(Object container)
Overrides org. Implements org. |
| public Object | cloneFor(Object container)
Overrides org. |
| public boolean | compareKeys(Object sourceValue, AbstractSession session)
Overrides org. |
| public Object | concatenateContainers(Object firstContainer, Object secondContainer, AbstractSession session)
Overrides org. |
| protected boolean | Returns: boolean true if container 'contains' elementOverrides org. |
| public void | convertClassNamesToClasses(ClassLoader classLoader)
Overrides org. |
| public CollectionChangeEvent | createChangeEvent(Object collectionOwner, String propertyName, Object collectionChanged, Object elementChanged, int changeType, Integer index, boolean isChangeApplied)
Overrides org. |
| public QueryKey | createQueryKeyForMapKey()
Overrides org. |
| public Object | createWrappedObjectFromExistingWrappedObject(Object wrappedObject, Object
if this is an aggregate, the owner of the aggregate parent, ClassDescriptor referenceDescriptor, MergeManager mergeManager, AbstractSession targetSession)
INTERNAL:
This method will actually potentially wrap an object in two ways.
|
| public DatabaseField | getDirectKeyField(CollectionMapping baseMapping)
Overrides org. |
| public Class | |
| public String | |
| public Class | getInterfaceType()
Implements abstract org. |
| public String | getKeyName()
INTERNAL: Returns the key name which will return the value of the key to be used in the container. |
| public Object | getKeyType()
Overrides org. |
| public boolean | hasNext(Object iterator)
Overrides org. Implements org. |
| protected void | |
| protected boolean | isKeyAvailableFromElement()
MapContainerPolicy is for mappings where the key is stored in actual element. |
| public boolean | isMapKeyAttribute()
Overrides org. |
| public boolean | isMapPolicy()
Overrides org. |
| public boolean | isValidContainer(Object container)
Overrides org. |
| public Object | iteratorFor(Object container)
Implements abstract org. Implements org. |
| public Object | keyFrom(Object element, AbstractSession session)
Overrides org. |
| public Object | keyFromEntry(Object entry)
Overrides org. |
| public Object | |
| protected Object | next(Object iterator)
Overrides org. |
| public Object | nextEntry(Object iterator)
Overrides org. Implements org. |
| public Object | nextEntry(Object iterator, AbstractSession session)
Overrides org. Implements org. |
| public void | prepare(DatabaseQuery query, AbstractSession session)
Overrides org. |
| public void | recordUpdateToCollectionInChangeRecord(CollectionChangeEvent event, ObjectChangeSet changeSet, CollectionChangeRecord collectionChangeRecord)
Overrides org. |
| public boolean | removeFrom(Object key, Object element, Object container, AbstractSession session)
Overrides org. |
| public void | |
| public void | setKeyMethod(String keyMethodName, Class<?> elementClass)
INTERNAL: Sets the Method to be used to generate the key in a Map type container class. |
| public void | setKeyMethod(String keyMethodName, String elementClassName)
INTERNAL: Sets the Method to be used to generate the key in a Map type container class. |
| public void | setKeyMethodName(String keyMethodName)
INTERNAL: Sets the Method to be used to generate the key in a Map type container class. |
| public void | setKeyName(String keyName, String elementClassName)
Overrides org. |
| public void | setKeyName(String keyName, Class<?> elementClass)
Overrides org. |
| public void | setKeyName(String keyName)
INTERNAL: Sets the key name to be used to generate the key in a Map type container class. |
| public int | sizeFor(Object container)
Overrides org. Implements org. |
| public Object | unwrapElement(Object object)
Overrides org. |
| public Object | unwrapIteratorResult(Object object)
Overrides org. |
| public Object | |
| public Object | valueFromPKList(Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session)
Overrides org. |