Module org.eclipse.persistence.core
Class InterfaceContainerPolicy
java.lang.Object
org.eclipse.persistence.internal.queries.ContainerPolicy
org.eclipse.persistence.internal.queries.InterfaceContainerPolicy
- All Implemented Interfaces:
Serializable
,Cloneable
,CoreContainerPolicy<AbstractSession>
- Direct Known Subclasses:
CollectionContainerPolicy
,MapContainerPolicy
Purpose: The abstract class for ContainerPolicy's whose container class implements a container interface.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Method
The method which will return a clone of an instance of the containerClass.protected Class
<?> The concrete container class.protected String
Fields inherited from class org.eclipse.persistence.internal.queries.ContainerPolicy
constructor, defaultContainerClass, elementDescriptor
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
INTERNAL: Construct a new policy.protected
InterfaceContainerPolicy
(Class<?> containerClass) INTERNAL: Construct a new policy for the specified class.protected
InterfaceContainerPolicy
(String containerClassName) INTERNAL: Construct a new policy for the specified class name. -
Method Summary
Modifier and TypeMethodDescriptionbuildContainerFromVector
(Vector vector, AbstractSession session) INTERNAL: Return a container populated with the contents of the specified Vector.INTERNAL: Return a clone of the specified container.void
convertClassNamesToClasses
(ClassLoader classLoader) INTERNAL: Convert all the class-name-based settings in this ContainerPolicy to actual class-based settings.createChangeEvent
(Object collectionOwner, String propertyName, Object collectionChanged, Object elementChanged, int changeType, Integer index, boolean isChangeApplied) INTERNAL: Creates a CollectionChangeEvent for the containerINTERNAL: Create a query key that links to the map key InterfaceContainerPolicy does not support maps, so this method will return null subclasses will extend this method.boolean
INTERNAL: Return if the policy is equal to the other.INTERNAL: Return the 'clone()' Method for the container class.protected Method
getCloneMethod
(Class<?> javaClass) INTERNAL: Return the 'clone()' Method for the specified class.Class
<?> INTERNAL: Returns the container class to be used with this policy.INTERNAL: Used by the MWgetDirectKeyField
(CollectionMapping mapping) INTERNAL: Return the DatabaseField that represents the key in a DirectMapMapping.abstract Class
<?> int
hashCode()
boolean
INTERNAL: Return whether the iterator has more objects,protected Object
invokeCloneMethodOn
(Method method, Object container) INTERNAL: Invoke the specified clone method on the container, handling the necessary exceptions.boolean
INTERNAL: Return whether a map key this container policy represents is an attribute By default this method will return false since only subclasses actually represent maps.boolean
isValidContainerType
(Class<?> containerType) INTERNAL: Validate the container type.protected Object
INTERNAL: Return the next object on the queue.void
setCloneMethod
(Method cloneMethod) INTERNAL: Set the Method that will return a clone of an instance of the containerClass.void
setContainerClass
(Class<?> containerClass) INTERNAL: Set the class to use as the container.void
setContainerClassName
(String containerClassName) INTERNAL: Used by the MWprotected Object
Methods inherited from class org.eclipse.persistence.internal.queries.ContainerPolicy
addAdditionalFieldsToQuery, addAll, addAll, addFieldsForMapKey, addInto, addInto, addInto, addInto, addNestedJoinsQueriesForMapKey, addNextValueFromIteratorInto, buildChangeSetForNewObjectInCollection, buildCloneForKey, buildCollectionEntry, buildDefaultPolicy, buildKey, buildKeyFromJoinedRow, buildPolicyFor, buildPolicyFor, buildReferencesPKList, buildSelectionQueryForDirectCollectionMapping, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, clear, clone, clone, collectObjectForNewCollection, compareCollectionsForChange, compareKeys, concatenateContainers, containerInstance, containerInstance, contains, contains, copyMapDataToRow, createChangeSetForKeys, createWrappedObjectFromExistingWrappedObject, deleteWrappedObject, execute, getAdditionalFieldsForJoin, getAdditionalTablesForJoinQuery, getChangeValuesFrom, getCloneDataFromChangeSet, getConstructor, getDefaultContainerClass, getDescriptorForMapKey, getElementDescriptor, getIdentityFieldsForMapKey, getKeyMappingDataForWriteQuery, getKeySelectionCriteria, getKeyType, hasElementDescriptor, hasOrder, initialize, initializeConstructor, isCollectionPolicy, isCursoredStreamPolicy, isCursorPolicy, isDirectMapPolicy, isEmpty, isListPolicy, isMapKeyObject, isMappedKeyMapPolicy, isMapPolicy, isOrderedListPolicy, isScrollableCursorPolicy, isValidContainer, iterateOnMapKey, iteratorFor, keyFrom, keyFromEntry, keyFromIterator, mergeCascadeParts, mergeChanges, mergeChanges, next, nextEntry, nextEntry, overridesRead, postCalculateChanges, postCalculateChanges, postInitialize, prepare, prepareForExecution, processAdditionalWritableMapKeyFields, propagatesEventsToCollection, propogatePostDelete, propogatePostInsert, propogatePostUpdate, propogatePreDelete, propogatePreInsert, propogatePreUpdate, recordAddToCollectionInChangeRecord, recordPrivateOwnedRemovals, recordRemoveFromCollectionInChangeRecord, recordUpdateToCollectionInChangeRecord, remoteExecute, removeFrom, removeFrom, removeFrom, requiresDataModificationEvents, setConstructor, setDefaultContainerClass, setElementDescriptor, setKeyName, setKeyName, shouldAddAll, shouldIncludeKeyInDeleteEvent, shouldUpdateForeignKeysPostInsert, sizeFor, toString, unwrapElement, unwrapIteratorResult, updateChangeRecordForSelfMerge, updateJoinedMappingIndexesForMapKey, valueFromPKList, vectorFor
-
Field Details
-
containerClass
The concrete container class. -
containerClassName
-
cloneMethod
The method which will return a clone of an instance of the containerClass.
-
-
Constructor Details
-
InterfaceContainerPolicy
protected InterfaceContainerPolicy()INTERNAL: Construct a new policy. -
InterfaceContainerPolicy
INTERNAL: Construct a new policy for the specified class. -
InterfaceContainerPolicy
INTERNAL: Construct a new policy for the specified class name.
-
-
Method Details
-
equals
INTERNAL: Return if the policy is equal to the other. By default if they are the same class, they are considered equal. This is used for query parse caching.- Overrides:
equals
in classContainerPolicy
-
hashCode
public int hashCode()- Overrides:
hashCode
in classContainerPolicy
-
cloneFor
INTERNAL: Return a clone of the specified container.- Overrides:
cloneFor
in classContainerPolicy
-
convertClassNamesToClasses
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:
convertClassNamesToClasses
in classContainerPolicy
-
createChangeEvent
public CollectionChangeEvent createChangeEvent(Object collectionOwner, String propertyName, Object collectionChanged, Object elementChanged, int changeType, Integer index, boolean isChangeApplied) INTERNAL: Creates a CollectionChangeEvent for the container- Specified by:
createChangeEvent
in classContainerPolicy
-
createQueryKeyForMapKey
INTERNAL: Create a query key that links to the map key InterfaceContainerPolicy does not support maps, so this method will return null subclasses will extend this method. -
getCloneMethod
INTERNAL: Return the 'clone()' Method for the container class. Lazy initialization is used, so we can serialize these things. -
getCloneMethod
INTERNAL: Return the 'clone()' Method for the specified class. Return null if the method does not exist anywhere in the hierarchy -
getContainerClass
INTERNAL: Returns the container class to be used with this policy.- Overrides:
getContainerClass
in classContainerPolicy
-
getContainerClassName
Description copied from class:ContainerPolicy
INTERNAL: Used by the MW- Overrides:
getContainerClassName
in classContainerPolicy
-
getDirectKeyField
INTERNAL: Return the DatabaseField that represents the key in a DirectMapMapping. If the keyMapping is not a DirectMapping, this will return null. -
getInterfaceType
-
hasNext
INTERNAL: Return whether the iterator has more objects,- Specified by:
hasNext
in interfaceCoreContainerPolicy<AbstractSession>
- Specified by:
hasNext
in classContainerPolicy
- See Also:
-
invokeCloneMethodOn
INTERNAL: Invoke the specified clone method on the container, handling the necessary exceptions. -
isMapKeyAttribute
public boolean isMapKeyAttribute()INTERNAL: Return whether a map key this container policy represents is an attribute By default this method will return false since only subclasses actually represent maps. -
isValidContainerType
INTERNAL: Validate the container type.- Overrides:
isValidContainerType
in classContainerPolicy
-
next
INTERNAL: Return the next object on the queue. Valid for some subclasses only.- Specified by:
next
in classContainerPolicy
- See Also:
-
setCloneMethod
INTERNAL: Set the Method that will return a clone of an instance of the containerClass. -
setContainerClass
INTERNAL: Set the class to use as the container.- Specified by:
setContainerClass
in interfaceCoreContainerPolicy<AbstractSession>
- Overrides:
setContainerClass
in classContainerPolicy
-
setContainerClassName
Description copied from class:ContainerPolicy
INTERNAL: Used by the MW- Overrides:
setContainerClassName
in classContainerPolicy
-
buildContainerFromVector
INTERNAL: Return a container populated with the contents of the specified Vector.- Overrides:
buildContainerFromVector
in classContainerPolicy
-
toStringInfo
- Overrides:
toStringInfo
in classContainerPolicy
-