Class MapContainerPolicy
- java.lang.Object
-
- org.eclipse.persistence.internal.queries.ContainerPolicy
-
- org.eclipse.persistence.internal.queries.InterfaceContainerPolicy
-
- org.eclipse.persistence.internal.queries.MapContainerPolicy
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,CoreContainerPolicy<AbstractSession>
- Direct Known Subclasses:
MappedKeyMapContainerPolicy
public class MapContainerPolicy extends InterfaceContainerPolicy
Purpose: A MapContainerPolicy is ContainerPolicy whose container class implements the Map interface.
Responsibilities: Provide the functionality to operate on an instance of a Map.
- See Also:
ContainerPolicy,CollectionContainerPolicy, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMapContainerPolicy.MapContainerPolicyIteratorINTERNAL: This inner class is used to iterate through the Map.Entry s of a Map.
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.ClasselementClassprotected java.lang.StringelementClassNameprotected java.lang.reflect.FieldkeyFieldprotected java.lang.reflect.MethodkeyMethodprotected java.lang.StringkeyNameThe Method which is called on each value added to the Map and whose result is used as key to the value.-
Fields inherited from class org.eclipse.persistence.internal.queries.InterfaceContainerPolicy
cloneMethod, containerClass, containerClassName
-
Fields inherited from class org.eclipse.persistence.internal.queries.ContainerPolicy
constructor, defaultContainerClass, elementDescriptor
-
-
Constructor Summary
Constructors Constructor Description MapContainerPolicy()INTERNAL: Construct a new policy.MapContainerPolicy(java.lang.Class containerClass)INTERNAL: Construct a new policy for the specified class.MapContainerPolicy(java.lang.String containerClassName)INTERNAL: Construct a new policy for the specified class name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddInto(java.lang.Object key, java.lang.Object element, java.lang.Object container, AbstractSession session)INTERNAL: Add element into container which implements the Map interface.booleanaddInto(java.lang.Object element, java.lang.Object container, AbstractSession session)INTERNAL: Add element to container.voidaddNextValueFromIteratorInto(java.lang.Object valuesIterator, java.lang.Object parent, CacheKey parentCacheKey, java.lang.Object toCollection, CollectionMapping mapping, java.lang.Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)INTERNAL: This method is used to add the next value from an iterator built using ContainerPolicy's iteratorFor() method into the toCollection.voidbuildChangeSetForNewObjectInCollection(java.lang.Object object, ClassDescriptor referenceDescriptor, UnitOfWorkChangeSet uowChangeSet, AbstractSession session)INTERNAL: Ensure the new key is set for the change set for a new map objectprotected java.lang.ObjectbuildCloneForValue(java.lang.Object value, java.lang.Object parent, CacheKey parentCacheKey, CollectionMapping mapping, java.lang.Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)Build a clone for the value in a mapping.java.lang.ObjectbuildCollectionEntry(java.lang.Object objectAdded, ObjectChangeSet changeSet)INTERNAL: Return an object representing an entry in the collection represented by this container policy This method will returns an Association containing the key and the value for a Mapjava.lang.Object[]buildReferencesPKList(java.lang.Object container, AbstractSession session)INTERNAL: This method will access the target relationship and create a list of information to rebuild the collection.voidclear(java.lang.Object container)INTERNAL: Remove all the elements from container.java.lang.ObjectcloneFor(java.lang.Object container)INTERNAL: Return a clone of the specified container.booleancompareKeys(java.lang.Object sourceValue, AbstractSession session)INTERNAL: Return true if keys are the same in the source as the backup.java.lang.ObjectconcatenateContainers(java.lang.Object firstContainer, java.lang.Object secondContainer, AbstractSession session)INTERNAL: Build a new container, add the contents of each of the specified containers to it, and return it.protected booleancontains(java.lang.Object element, java.lang.Object container)INTERNAL: Return the true if element exists in container.voidconvertClassNamesToClasses(java.lang.ClassLoader classLoader)INTERNAL: Convert all the class-name-based settings in this ContainerPolicy to actual class-based settings.CollectionChangeEventcreateChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType, java.lang.Integer index, boolean isChangeApplied)INTERNAL: Creates a CollectionChangeEvent for the containerQueryKeycreateQueryKeyForMapKey()INTERNAL: Create a query key that links to the map key.java.lang.ObjectcreateWrappedObjectFromExistingWrappedObject(java.lang.Object wrappedObject, java.lang.Object parent, ClassDescriptor referenceDescriptor, MergeManager mergeManager, AbstractSession targetSession)INTERNAL: This method will actually potentially wrap an object in two ways.DatabaseFieldgetDirectKeyField(CollectionMapping baseMapping)INTERNAL: Return the DatabaseField that represents the key in a DirectMapMapping.java.lang.ClassgetElementClass()INTERNAL: Returns the element class which defines the map key.java.lang.StringgetElementClassName()INTERNAL: Returns the element class name which defines the map key.java.lang.ClassgetInterfaceType()INTERNAL:java.lang.StringgetKeyName()INTERNAL: Returns the key name which will return the value of the key to be used in the container.java.lang.ObjectgetKeyType()INTERNAL: Return the type of the map key, this will be overridden by container policies that allow maps.booleanhasNext(java.lang.Object iterator)INTERNAL: Return whether the iterator has more objects.protected voidinitializeKey()INTERNAL: Set the keyMethod or keyField based on the keyName.protected booleanisKeyAvailableFromElement()MapContainerPolicy is for mappings where the key is stored in actual element.booleanisMapKeyAttribute()INTERNAL: Return whether a map key this container policy represents is an attribute.booleanisMapPolicy()INTERNAL Yes this is a MapPolicybooleanisValidContainer(java.lang.Object container)INTERNAL: Validate the container type.java.lang.ObjectiteratorFor(java.lang.Object container)INTERNAL: Return an Iterator for the given container.java.lang.ObjectkeyFrom(java.lang.Object element, AbstractSession session)INTERNAL: Return the key for the specified element.java.lang.ObjectkeyFromEntry(java.lang.Object entry)Get the key from the passed in Map.Entry.java.lang.ObjectkeyFromIterator(java.lang.Object iterator)protected java.lang.Objectnext(java.lang.Object iterator)INTERNAL: Return the next object on the queue.java.lang.ObjectnextEntry(java.lang.Object iterator)INTERNAL: Return the next object on the queue.java.lang.ObjectnextEntry(java.lang.Object iterator, AbstractSession session)INTERNAL: Return the next object on the queue.voidprepare(DatabaseQuery query, AbstractSession session)Prepare and validate.voidrecordUpdateToCollectionInChangeRecord(CollectionChangeEvent event, ObjectChangeSet changeSet, CollectionChangeRecord collectionChangeRecord)This method is used to bridge the behavior between Attribute Change Tracking and deferred change tracking with respect to adding the same instance multiple times.booleanremoveFrom(java.lang.Object key, java.lang.Object element, java.lang.Object container, AbstractSession session)INTERNAL: Remove element from container which implements the Map interface.voidsetElementClass(java.lang.Class elementClass)INTERNAL: Sets the element class which defines the method.voidsetKeyMethod(java.lang.String keyMethodName, java.lang.Class elementClass)INTERNAL: Sets the Method to be used to generate the key in a Map type container class.voidsetKeyMethod(java.lang.String keyMethodName, java.lang.String elementClassName)INTERNAL: Sets the Method to be used to generate the key in a Map type container class.voidsetKeyMethodName(java.lang.String keyMethodName)INTERNAL: Sets the Method to be used to generate the key in a Map type container class.voidsetKeyName(java.lang.String keyName)INTERNAL: Sets the key name to be used to generate the key in a Map type container class.voidsetKeyName(java.lang.String keyName, java.lang.Class elementClass)INTERNAL: Sets the key name to be used to generate the key in a Map type container class.voidsetKeyName(java.lang.String keyName, java.lang.String elementClassName)INTERNAL: Sets the key name to be used to generate the key in a Map type container class.intsizeFor(java.lang.Object container)INTERNAL: Return the size of container.java.lang.ObjectunwrapElement(java.lang.Object object)INTERNAL: MapContainerPolicy's iterator iterates on the Entries of a Map.java.lang.ObjectunwrapIteratorResult(java.lang.Object object)INTERNAL: MapContainerPolicy's iterator iterates on the Entries of a Map.java.lang.ObjectunwrapKey(java.lang.Object key, AbstractSession session)INTERNAL: Allow the key to be unwrapped.java.lang.ObjectvalueFromPKList(java.lang.Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session)INTERNAL: This method is used to load a relationship from a list of PKs.-
Methods inherited from class org.eclipse.persistence.internal.queries.InterfaceContainerPolicy
buildContainerFromVector, equals, getCloneMethod, getCloneMethod, getContainerClass, getContainerClassName, hashCode, invokeCloneMethodOn, isValidContainerType, setCloneMethod, setContainerClass, setContainerClassName, toStringInfo
-
Methods inherited from class org.eclipse.persistence.internal.queries.ContainerPolicy
addAdditionalFieldsToQuery, addAll, addAll, addFieldsForMapKey, addInto, addInto, addNestedJoinsQueriesForMapKey, buildCloneForKey, buildDefaultPolicy, buildKey, buildKeyFromJoinedRow, buildPolicyFor, buildPolicyFor, buildSelectionQueryForDirectCollectionMapping, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, clone, clone, collectObjectForNewCollection, compareCollectionsForChange, containerInstance, containerInstance, contains, copyMapDataToRow, createChangeSetForKeys, deleteWrappedObject, execute, getAdditionalFieldsForJoin, getAdditionalTablesForJoinQuery, getChangeValuesFrom, getCloneDataFromChangeSet, getConstructor, getDefaultContainerClass, getDescriptorForMapKey, getElementDescriptor, getIdentityFieldsForMapKey, getKeyMappingDataForWriteQuery, getKeySelectionCriteria, hasElementDescriptor, hasOrder, initialize, initializeConstructor, isCollectionPolicy, isCursoredStreamPolicy, isCursorPolicy, isDirectMapPolicy, isEmpty, isListPolicy, isMapKeyObject, isMappedKeyMapPolicy, isOrderedListPolicy, isScrollableCursorPolicy, iterateOnMapKey, mergeCascadeParts, mergeChanges, mergeChanges, next, overridesRead, postCalculateChanges, postCalculateChanges, postInitialize, prepareForExecution, processAdditionalWritableMapKeyFields, propagatesEventsToCollection, propogatePostDelete, propogatePostInsert, propogatePostUpdate, propogatePreDelete, propogatePreInsert, propogatePreUpdate, recordAddToCollectionInChangeRecord, recordPrivateOwnedRemovals, recordRemoveFromCollectionInChangeRecord, remoteExecute, removeFrom, removeFrom, requiresDataModificationEvents, setConstructor, setDefaultContainerClass, setElementDescriptor, shouldAddAll, shouldIncludeKeyInDeleteEvent, shouldUpdateForeignKeysPostInsert, toString, updateChangeRecordForSelfMerge, updateJoinedMappingIndexesForMapKey, vectorFor
-
-
-
-
Field Detail
-
keyName
protected java.lang.String keyName
The Method which is called on each value added to the Map and whose result is used as key to the value.
-
elementClassName
protected java.lang.String elementClassName
-
elementClass
protected java.lang.Class elementClass
-
keyField
protected transient java.lang.reflect.Field keyField
-
keyMethod
protected transient java.lang.reflect.Method keyMethod
-
-
Constructor Detail
-
MapContainerPolicy
public MapContainerPolicy()
INTERNAL: Construct a new policy.
-
MapContainerPolicy
public MapContainerPolicy(java.lang.Class containerClass)
INTERNAL: Construct a new policy for the specified class.
-
MapContainerPolicy
public MapContainerPolicy(java.lang.String containerClassName)
INTERNAL: Construct a new policy for the specified class name.
-
-
Method Detail
-
prepare
public void prepare(DatabaseQuery query, AbstractSession session) throws QueryException
Prepare and validate. Set the element class.- Overrides:
preparein classContainerPolicy- Throws:
QueryException
-
addInto
public boolean addInto(java.lang.Object element, java.lang.Object container, AbstractSession session)INTERNAL: Add element to container. This is used to add to a collection independent of the collection type. The session may be required to wrap for the wrapper policy. Return whether the container changed.- Specified by:
addIntoin interfaceCoreContainerPolicy<AbstractSession>- Overrides:
addIntoin classContainerPolicy
-
addInto
public boolean addInto(java.lang.Object key, java.lang.Object element, java.lang.Object container, AbstractSession session)INTERNAL: Add element into container which implements the Map interface.- Specified by:
addIntoin interfaceCoreContainerPolicy<AbstractSession>- Overrides:
addIntoin classContainerPolicy
-
addNextValueFromIteratorInto
public void addNextValueFromIteratorInto(java.lang.Object valuesIterator, java.lang.Object parent, CacheKey parentCacheKey, java.lang.Object toCollection, CollectionMapping mapping, java.lang.Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)INTERNAL: This method is used to add the next value from an iterator built using ContainerPolicy's iteratorFor() method into the toCollection. Since this ContainerPolicy represents a Map, the key and the value are extracted and added.- Overrides:
addNextValueFromIteratorIntoin classContainerPolicy- See Also:
MappedKeyMapContainerPolicy
-
buildCollectionEntry
public java.lang.Object buildCollectionEntry(java.lang.Object objectAdded, ObjectChangeSet changeSet)INTERNAL: Return an object representing an entry in the collection represented by this container policy This method will returns an Association containing the key and the value for a Map- Overrides:
buildCollectionEntryin classContainerPolicy- Returns:
- See Also:
MappedKeyMapContainerPolicy
-
buildReferencesPKList
public java.lang.Object[] buildReferencesPKList(java.lang.Object container, AbstractSession session)INTERNAL: This method will access the target relationship and create a list of information to rebuild the collection. For the MapContainerPolicy this return will consist of an array with serial Map entry key and value elements.- Overrides:
buildReferencesPKListin classContainerPolicy- See Also:
ObjectReferenceMapping.buildReferencesPKList,ContainerPolicy.buildReferencesPKList
-
buildChangeSetForNewObjectInCollection
public void buildChangeSetForNewObjectInCollection(java.lang.Object object, ClassDescriptor referenceDescriptor, UnitOfWorkChangeSet uowChangeSet, AbstractSession session)INTERNAL: Ensure the new key is set for the change set for a new map object- Overrides:
buildChangeSetForNewObjectInCollectionin classContainerPolicy
-
buildCloneForValue
protected java.lang.Object buildCloneForValue(java.lang.Object value, java.lang.Object parent, CacheKey parentCacheKey, CollectionMapping mapping, java.lang.Integer refreshCascade, AbstractSession cloningSession, boolean isExisting, boolean isFromSharedCache)Build a clone for the value in a mapping.
-
clear
public void clear(java.lang.Object container)
INTERNAL: Remove all the elements from container.- Specified by:
clearin interfaceCoreContainerPolicy<AbstractSession>- Overrides:
clearin classContainerPolicy
-
cloneFor
public java.lang.Object cloneFor(java.lang.Object container)
INTERNAL: Return a clone of the specified container.- Overrides:
cloneForin classInterfaceContainerPolicy
-
compareKeys
public boolean compareKeys(java.lang.Object sourceValue, AbstractSession session)INTERNAL: Return true if keys are the same in the source as the backup. False otherwise in the case of read-only compare against the original- Overrides:
compareKeysin classContainerPolicy
-
concatenateContainers
public java.lang.Object concatenateContainers(java.lang.Object firstContainer, java.lang.Object secondContainer, AbstractSession session)INTERNAL: Build a new container, add the contents of each of the specified containers to it, and return it. Both of the containers must use the same container policy (namely, this one).- Overrides:
concatenateContainersin classContainerPolicy
-
contains
protected boolean contains(java.lang.Object element, java.lang.Object container)INTERNAL: Return the true if element exists in container.- Overrides:
containsin classContainerPolicy- Returns:
- boolean true if container 'contains' element
-
convertClassNamesToClasses
public void convertClassNamesToClasses(java.lang.ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings in this ContainerPolicy to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.- Overrides:
convertClassNamesToClassesin classInterfaceContainerPolicy- Parameters:
classLoader-
-
createChangeEvent
public CollectionChangeEvent createChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType, java.lang.Integer index, boolean isChangeApplied)
INTERNAL: Creates a CollectionChangeEvent for the container- Overrides:
createChangeEventin classInterfaceContainerPolicy
-
createQueryKeyForMapKey
public QueryKey createQueryKeyForMapKey()
INTERNAL: Create a query key that links to the map key. MapContainerPolicy does not have a specific mapping for the key, so return null.- Overrides:
createQueryKeyForMapKeyin classInterfaceContainerPolicy
-
createWrappedObjectFromExistingWrappedObject
public java.lang.Object createWrappedObjectFromExistingWrappedObject(java.lang.Object wrappedObject, java.lang.Object parent, ClassDescriptor referenceDescriptor, MergeManager mergeManager, AbstractSession targetSession)INTERNAL: This method will actually potentially wrap an object in two ways. It will first wrap the object based on the referenceDescriptor's wrapper policy. It will also potentially do some wrapping based on what is required by the container policy.- Overrides:
createWrappedObjectFromExistingWrappedObjectin classContainerPolicyparent- if this is an aggregate, the owner of the aggregate- Returns:
- See Also:
MappedKeyMapContainerPolicy
-
getDirectKeyField
public DatabaseField getDirectKeyField(CollectionMapping baseMapping)
INTERNAL: Return the DatabaseField that represents the key in a DirectMapMapping. MapContainerPolicy gets it fields from the reference descriptor of the provided mappings. It uses its keyName to lookup the appropriate mapping and returns the field from that mapping.- Overrides:
getDirectKeyFieldin classInterfaceContainerPolicy
-
getElementClass
public java.lang.Class getElementClass()
INTERNAL: Returns the element class which defines the map key.
-
getElementClassName
public java.lang.String getElementClassName()
INTERNAL: Returns the element class name which defines the map key.
-
getInterfaceType
public java.lang.Class getInterfaceType()
INTERNAL:- Specified by:
getInterfaceTypein classInterfaceContainerPolicy
-
getKeyName
public java.lang.String getKeyName()
INTERNAL: Returns the key name which will return the value of the key to be used in the container.
-
getKeyType
public java.lang.Object getKeyType()
INTERNAL: Return the type of the map key, this will be overridden by container policies that allow maps.- Overrides:
getKeyTypein classContainerPolicy
-
isMapPolicy
public boolean isMapPolicy()
INTERNAL Yes this is a MapPolicy- Overrides:
isMapPolicyin classContainerPolicy
-
isKeyAvailableFromElement
protected boolean isKeyAvailableFromElement()
MapContainerPolicy is for mappings where the key is stored in actual element.
-
isMapKeyAttribute
public boolean isMapKeyAttribute()
INTERNAL: Return whether a map key this container policy represents is an attribute.- Overrides:
isMapKeyAttributein classInterfaceContainerPolicy
-
hasNext
public boolean hasNext(java.lang.Object iterator)
INTERNAL: Return whether the iterator has more objects. The iterator is the one returned from #iteratorFor().- Specified by:
hasNextin interfaceCoreContainerPolicy<AbstractSession>- Overrides:
hasNextin classInterfaceContainerPolicy- See Also:
ContainerPolicy.iteratorFor(java.lang.Object)
-
initializeKey
protected void initializeKey()
INTERNAL: Set the keyMethod or keyField based on the keyName.
-
iteratorFor
public java.lang.Object iteratorFor(java.lang.Object container)
INTERNAL: Return an Iterator for the given container.- Specified by:
iteratorForin interfaceCoreContainerPolicy<AbstractSession>- Specified by:
iteratorForin classContainerPolicy- See Also:
ContainerPolicy.hasNext(java.lang.Object),ContainerPolicy.next(java.lang.Object)
-
keyFrom
public java.lang.Object keyFrom(java.lang.Object element, AbstractSession session)INTERNAL: Return the key for the specified element.- Overrides:
keyFromin classContainerPolicy
-
keyFromEntry
public java.lang.Object keyFromEntry(java.lang.Object entry)
Get the key from the passed in Map.Entry.- Overrides:
keyFromEntryin classContainerPolicy
-
keyFromIterator
public java.lang.Object keyFromIterator(java.lang.Object iterator)
- Overrides:
keyFromIteratorin classContainerPolicy
-
next
protected java.lang.Object next(java.lang.Object iterator)
INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor().- Overrides:
nextin classInterfaceContainerPolicy- See Also:
ContainerPolicy.iteratorFor(java.lang.Object)
-
nextEntry
public java.lang.Object nextEntry(java.lang.Object iterator)
INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor(). This will return a MapEntry to allow use of the key- Specified by:
nextEntryin interfaceCoreContainerPolicy<AbstractSession>- Overrides:
nextEntryin classContainerPolicy- See Also:
ContainerPolicy.iteratorFor(java.lang.Object)
-
nextEntry
public java.lang.Object nextEntry(java.lang.Object iterator, AbstractSession session)INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor(). This will return a MapEntry to allow use of the key- Specified by:
nextEntryin interfaceCoreContainerPolicy<AbstractSession>- Overrides:
nextEntryin classContainerPolicy- See Also:
ContainerPolicy#iteratorFor(Object iterator, AbstractSession session)
-
unwrapElement
public java.lang.Object unwrapElement(java.lang.Object object)
INTERNAL: MapContainerPolicy's iterator iterates on the Entries of a Map. This method returns the object from the iterator- Overrides:
unwrapElementin classContainerPolicy
-
unwrapIteratorResult
public java.lang.Object unwrapIteratorResult(java.lang.Object object)
INTERNAL: MapContainerPolicy's iterator iterates on the Entries of a Map. This method returns the object from the iterator- Overrides:
unwrapIteratorResultin classContainerPolicy
-
unwrapKey
public java.lang.Object unwrapKey(java.lang.Object key, AbstractSession session)INTERNAL: Allow the key to be unwrapped. This will be overridden by container policies that allow keys that are entities.
-
recordUpdateToCollectionInChangeRecord
public void recordUpdateToCollectionInChangeRecord(CollectionChangeEvent event, ObjectChangeSet changeSet, CollectionChangeRecord collectionChangeRecord)
This method is used to bridge the behavior between Attribute Change Tracking and deferred change tracking with respect to adding the same instance multiple times. Each ContainerPolicy type will implement specific behavior for the collection type it is wrapping. These methods are only valid for collections containing object references- Overrides:
recordUpdateToCollectionInChangeRecordin classContainerPolicy
-
removeFrom
public boolean removeFrom(java.lang.Object key, java.lang.Object element, java.lang.Object container, AbstractSession session)INTERNAL: Remove element from container which implements the Map interface.- Overrides:
removeFromin classContainerPolicy
-
setElementClass
public void setElementClass(java.lang.Class elementClass)
INTERNAL: Sets the element class which defines the method.
-
isValidContainer
public boolean isValidContainer(java.lang.Object container)
INTERNAL: Validate the container type.- Overrides:
isValidContainerin classContainerPolicy- See Also:
CollectionContainerPolicy.isValidContainer(Object),isValidContainer(Object)
-
setKeyName
public void setKeyName(java.lang.String keyName, java.lang.String elementClassName)INTERNAL: Sets the key name to be used to generate the key in a Map type container class. The key name, may be the name of a field or method.- Overrides:
setKeyNamein classContainerPolicy- See Also:
MapContainerPolicy
-
setKeyName
public void setKeyName(java.lang.String keyName, java.lang.Class elementClass)INTERNAL: Sets the key name to be used to generate the key in a Map type container class. The key name, may be the name of a field or method. An instance of the class is provided in the case when the descriptor is being built in code.- Overrides:
setKeyNamein classContainerPolicy
-
setKeyName
public void setKeyName(java.lang.String keyName)
INTERNAL: Sets the key name to be used to generate the key in a Map type container class. The key name, maybe the name of a field or method.
-
setKeyMethod
public void setKeyMethod(java.lang.String keyMethodName, java.lang.Class elementClass)INTERNAL: Sets the Method to be used to generate the key in a Map type container class.
-
setKeyMethod
public void setKeyMethod(java.lang.String keyMethodName, java.lang.String elementClassName)INTERNAL: Sets the Method to be used to generate the key in a Map type container class.
-
setKeyMethodName
public void setKeyMethodName(java.lang.String keyMethodName)
INTERNAL: Sets the Method to be used to generate the key in a Map type container class.
-
sizeFor
public int sizeFor(java.lang.Object container)
INTERNAL: Return the size of container.- Specified by:
sizeForin interfaceCoreContainerPolicy<AbstractSession>- Overrides:
sizeForin classContainerPolicy
-
valueFromPKList
public java.lang.Object valueFromPKList(java.lang.Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session)INTERNAL: This method is used to load a relationship from a list of PKs. This list may be available if the relationship has been cached.- Overrides:
valueFromPKListin classContainerPolicy
-
-