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
| Access | Constructor and Description |
|---|---|
| public | |
| public | ListContainerPolicy(Class<?> containerClass)
INTERNAL: Construct a new policy for the specified class. |
| public | ListContainerPolicy(String containerClassName)
INTERNAL: Construct a new policy for the specified class name. |
| Modifier and Type | Method and Description |
|---|---|
| public Object | get(int index, Object container, AbstractSession session)
INTERNAL: Returns the element at the specified position in this list. |
| public boolean | hasOrder()
Overrides org. |
| public int | indexOf(Object element, 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. |
| public boolean | |
| public boolean | isValidContainer(Object container)
Overrides org. |
| public void | recordAddToCollectionInChangeRecord(ObjectChangeSet changeSetToAdd, CollectionChangeRecord collectionChangeRecord)
Overrides org. |
| public void | recordRemoveFromCollectionInChangeRecord(ObjectChangeSet changeSetToRemove, CollectionChangeRecord collectionChangeRecord)
Overrides org. |
| public void | updateChangeRecordForSelfMerge(ChangeRecord changeRecord, Object source, Object target, ForeignReferenceMapping mapping, UnitOfWorkChangeSet parentUOWChangeSet, UnitOfWorkImpl unitOfWork)
Overrides org. |
| public Object | valueFromPKList(Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session)
Overrides org. |
| ListContainerPolicy | back to summary |
|---|---|
| public ListContainerPolicy() INTERNAL: Construct a new policy. | |
| ListContainerPolicy | back to summary |
|---|---|
| public ListContainerPolicy(Class<?> containerClass) INTERNAL: Construct a new policy for the specified class. | |
| ListContainerPolicy | back to summary |
|---|---|
| public ListContainerPolicy(String containerClassName) INTERNAL: Construct a new policy for the specified class name. | |
| get | back to summary |
|---|---|
| public Object get(int index, Object container, AbstractSession session) INTERNAL: Returns the element at the specified position in this list. The session may be required to unwrap for the wrapper policy. | |
| hasOrder | back to summary |
|---|---|
| public boolean hasOrder() Overrides org. INTERNAL: Returns true if the collection has order
| |
| indexOf | back to summary |
|---|---|
| public int indexOf(Object element, 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. | |
| isListPolicy | back to summary |
|---|---|
| public boolean isListPolicy() Overrides org. Implements org.
| |
| isValidContainer | back to summary |
|---|---|
| public boolean isValidContainer(Object container) Overrides org. INTERNAL: Validate the container type.
| |
| recordAddToCollectionInChangeRecord | back to summary |
|---|---|
| public void recordAddToCollectionInChangeRecord(ObjectChangeSet changeSetToAdd, CollectionChangeRecord collectionChangeRecord) Overrides org. 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
| |
| recordRemoveFromCollectionInChangeRecord | back to summary |
|---|---|
| public void recordRemoveFromCollectionInChangeRecord(ObjectChangeSet changeSetToRemove, CollectionChangeRecord collectionChangeRecord) Overrides org. 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
| |
| updateChangeRecordForSelfMerge | back to summary |
|---|---|
| public void updateChangeRecordForSelfMerge(ChangeRecord changeRecord, Object source, Object target, ForeignReferenceMapping mapping, UnitOfWorkChangeSet parentUOWChangeSet, UnitOfWorkImpl unitOfWork) Overrides org. INTERNAL: Update a ChangeRecord to replace the ChangeSet for the old entity with the changeSet for the new Entity. This is used when an Entity is merged into itself and the Entity reference new or detached entities.
| |
| valueFromPKList | back to summary |
|---|---|
| public Object valueFromPKList(Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session) Overrides org. 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.
| |