public class ListContainerPolicy extends CollectionContainerPolicy
Purpose: A ListContainerPolicy is ContainerPolicy whose container class implements the List interface. This signifies that the collection has order
Responsibilities: Provide the functionality to operate on an instance of a List.
ContainerPolicy
,
CollectionContainerPolicy
,
Serialized FormConstructor and Description |
---|
ListContainerPolicy()
INTERNAL:
Construct a new policy.
|
ListContainerPolicy(java.lang.Class containerClass)
INTERNAL:
Construct a new policy for the specified class.
|
ListContainerPolicy(java.lang.String containerClassName)
INTERNAL:
Construct a new policy for the specified class name.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
get(int index,
java.lang.Object container,
AbstractSession session)
INTERNAL:
Returns the element at the specified position in this list.
|
boolean |
hasOrder()
INTERNAL:
Returns true if the collection has order
|
int |
indexOf(java.lang.Object element,
java.lang.Object container,
AbstractSession session)
INTERNAL:
Returns the index in this list of the first occurrence of the specified element,
or -1 if this list does not contain this element
The session may be required to unwrap for the wrapper policy.
|
boolean |
isListPolicy() |
boolean |
isValidContainer(java.lang.Object container)
INTERNAL:
Validate the container type.
|
void |
recordAddToCollectionInChangeRecord(ObjectChangeSet changeSetToAdd,
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.
|
void |
recordRemoveFromCollectionInChangeRecord(ObjectChangeSet changeSetToRemove,
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.
|
void |
updateChangeRecordForSelfMerge(ChangeRecord changeRecord,
java.lang.Object source,
java.lang.Object target,
ForeignReferenceMapping mapping,
UnitOfWorkChangeSet parentUOWChangeSet,
UnitOfWorkImpl unitOfWork)
INTERNAL:
Update a ChangeRecord to replace the ChangeSet for the old entity with the changeSet for the new Entity.
|
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.
|
addInto, buildContainerFromVector, clear, cloneFor, getInterfaceType, isCollectionPolicy, iteratorFor, sizeFor
convertClassNamesToClasses, createChangeEvent, createQueryKeyForMapKey, equals, getCloneMethod, getContainerClass, getContainerClassName, getDirectKeyField, hasNext, isMapKeyAttribute, isValidContainerType, setCloneMethod, setContainerClass, setContainerClassName
addAdditionalFieldsToQuery, addAll, addAll, addFieldsForMapKey, addInto, addInto, addInto, addNestedJoinsQueriesForMapKey, addNextValueFromIteratorInto, buildChangeSetForNewObjectInCollection, buildCloneForKey, buildCollectionEntry, buildDefaultPolicy, buildKey, buildKeyFromJoinedRow, buildPolicyFor, buildPolicyFor, buildReferencesPKList, buildSelectionQueryForDirectCollectionMapping, cascadeDiscoverAndPersistUnregisteredNewObjects, cascadePerformRemoveIfRequired, cascadeRegisterNewIfRequired, clone, clone, compareCollectionsForChange, compareKeys, concatenateContainers, containerInstance, containerInstance, contains, copyMapDataToRow, createWrappedObjectFromExistingWrappedObject, deleteWrappedObject, execute, getAdditionalFieldsForJoin, getAdditionalTablesForJoinQuery, getChangeValuesFrom, getCloneDataFromChangeSet, getDefaultContainerClass, getDescriptorForMapKey, getElementDescriptor, getIdentityFieldsForMapKey, getKeyMappingDataForWriteQuery, getKeySelectionCriteria, getKeyType, hasElementDescriptor, initialize, initializeConstructor, isCursoredStreamPolicy, isCursorPolicy, isDirectMapPolicy, isEmpty, isMapKeyObject, isMappedKeyMapPolicy, isMapPolicy, isOrderedListPolicy, isScrollableCursorPolicy, iterateOnMapKey, keyFrom, keyFromEntry, keyFromIterator, mergeCascadeParts, mergeChanges, next, nextEntry, nextEntry, overridesRead, postCalculateChanges, postCalculateChanges, postInitialize, prepare, prepareForExecution, processAdditionalWritableMapKeyFields, propagatesEventsToCollection, propogatePostDelete, propogatePostInsert, propogatePostUpdate, propogatePreDelete, propogatePreInsert, propogatePreUpdate, recordPrivateOwnedRemovals, recordUpdateToCollectionInChangeRecord, remoteExecute, removeFrom, removeFrom, requiresDataModificationEvents, setDefaultContainerClass, setElementDescriptor, setKeyName, setKeyName, shouldAddAll, shouldIncludeKeyInDeleteEvent, shouldUpdateForeignKeysPostInsert, toString, unwrapElement, unwrapIteratorResult, updateJoinedMappingIndexesForMapKey, vectorFor
public ListContainerPolicy()
public ListContainerPolicy(java.lang.Class containerClass)
public ListContainerPolicy(java.lang.String containerClassName)
public java.lang.Object get(int index, java.lang.Object container, AbstractSession session)
public boolean isValidContainer(java.lang.Object container)
isValidContainer
in class CollectionContainerPolicy
CollectionContainerPolicy.isValidContainer(Object)
,
MapContainerPolicy.isValidContainer(Object)
public boolean hasOrder()
hasOrder
in class CollectionContainerPolicy
ContainerPolicy.iteratorFor(java.lang.Object)
public boolean isListPolicy()
isListPolicy
in interface CoreContainerPolicy<AbstractSession>
isListPolicy
in class ContainerPolicy
public int indexOf(java.lang.Object element, java.lang.Object container, AbstractSession session)
public void recordAddToCollectionInChangeRecord(ObjectChangeSet changeSetToAdd, CollectionChangeRecord collectionChangeRecord)
recordAddToCollectionInChangeRecord
in class ContainerPolicy
public void recordRemoveFromCollectionInChangeRecord(ObjectChangeSet changeSetToRemove, CollectionChangeRecord collectionChangeRecord)
recordRemoveFromCollectionInChangeRecord
in class ContainerPolicy
public void updateChangeRecordForSelfMerge(ChangeRecord changeRecord, java.lang.Object source, java.lang.Object target, ForeignReferenceMapping mapping, UnitOfWorkChangeSet parentUOWChangeSet, UnitOfWorkImpl unitOfWork)
updateChangeRecordForSelfMerge
in class ContainerPolicy
public java.lang.Object valueFromPKList(java.lang.Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session)
valueFromPKList
in class ContainerPolicy
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference