Top Description Constructors Methods
org.eclipse.persistence.internal.queries

public Class ListContainerPolicy

extends CollectionContainerPolicy
Class Inheritance
Known Direct Subclasses
org.eclipse.persistence.internal.queries.OrderedListContainerPolicy, org.eclipse.persistence.internal.queries.VectorContainerPolicy, org.eclipse.persistence.internal.queries.ArrayListContainerPolicy, org.eclipse.persistence.internal.queries.IndirectListContainerPolicy
Imports
java.util.ArrayList, .Arrays, .Collection, .List, .Map, org.eclipse.persistence.annotations.CacheKeyType, org.eclipse.persistence.internal.identitymaps.CacheId, org.eclipse.persistence.internal.sessions.AbstractRecord, .AbstractSession, .ChangeRecord, .CollectionChangeRecord, .ObjectChangeSet, .UnitOfWorkChangeSet, .UnitOfWorkImpl, org.eclipse.persistence.mappings.ForeignReferenceMapping, org.eclipse.persistence.queries.ReadAllQuery

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.

See Also
ContainerPolicy, CollectionContainerPolicy

Constructor Summary

AccessConstructor and Description
public
ListContainerPolicy()

INTERNAL: Construct a new policy.

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.

Method Summary

Modifier and TypeMethod 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.eclipse.persistence.internal.queries.CollectionContainerPolicy.hasOrder.

INTERNAL: Returns true if the collection has order
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
public void
recordAddToCollectionInChangeRecord(ObjectChangeSet changeSetToAdd, CollectionChangeRecord collectionChangeRecord)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.recordAddToCollectionInChangeRecord.

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.
public void
recordRemoveFromCollectionInChangeRecord(ObjectChangeSet changeSetToRemove, CollectionChangeRecord collectionChangeRecord)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.recordRemoveFromCollectionInChangeRecord.

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.
public void
updateChangeRecordForSelfMerge(ChangeRecord changeRecord, Object source, Object target, ForeignReferenceMapping mapping, UnitOfWorkChangeSet parentUOWChangeSet, UnitOfWorkImpl unitOfWork)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.updateChangeRecordForSelfMerge.

INTERNAL: Update a ChangeRecord to replace the ChangeSet for the old entity with the changeSet for the new Entity.
public Object
valueFromPKList(Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.valueFromPKList.

INTERNAL: This method is used to load a relationship from a list of PKs.
Inherited from org.eclipse.persistence.internal.queries.CollectionContainerPolicy:
addIntobuildContainerFromVectorclearcloneForcontainsgetInterfaceTypeisCollectionPolicyiteratorForremoveFromsizeFor

Constructor Detail

ListContainerPolicyback to summary
public ListContainerPolicy()

INTERNAL: Construct a new policy.

ListContainerPolicyback to summary
public ListContainerPolicy(Class<?> containerClass)

INTERNAL: Construct a new policy for the specified class.

ListContainerPolicyback to summary
public ListContainerPolicy(String containerClassName)

INTERNAL: Construct a new policy for the specified class name.

Method Detail

getback 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.

hasOrderback to summary
public boolean hasOrder()

Overrides org.eclipse.persistence.internal.queries.CollectionContainerPolicy.hasOrder.

INTERNAL: Returns true if the collection has order

Annotations
@Override
See Also
ContainerPolicy#iteratorFor(java.lang.Object)
indexOfback 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.

isListPolicyback to summary
public boolean isListPolicy()

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.isListPolicy.

Implements org.eclipse.persistence.internal.core.queries.CoreContainerPolicy.isListPolicy.

Annotations
@Override
isValidContainerback to summary
public boolean isValidContainer(Object container)

Overrides org.eclipse.persistence.internal.queries.CollectionContainerPolicy.isValidContainer.

INTERNAL: Validate the container type.

Annotations
@Override
recordAddToCollectionInChangeRecordback to summary
public void recordAddToCollectionInChangeRecord(ObjectChangeSet changeSetToAdd, CollectionChangeRecord collectionChangeRecord)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.recordAddToCollectionInChangeRecord.

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

Annotations
@Override
recordRemoveFromCollectionInChangeRecordback to summary
public void recordRemoveFromCollectionInChangeRecord(ObjectChangeSet changeSetToRemove, CollectionChangeRecord collectionChangeRecord)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.recordRemoveFromCollectionInChangeRecord.

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

Annotations
@Override
updateChangeRecordForSelfMergeback to summary
public void updateChangeRecordForSelfMerge(ChangeRecord changeRecord, Object source, Object target, ForeignReferenceMapping mapping, UnitOfWorkChangeSet parentUOWChangeSet, UnitOfWorkImpl unitOfWork)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.updateChangeRecordForSelfMerge.

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.

Annotations
@Override
valueFromPKListback to summary
public Object valueFromPKList(Object[] pks, AbstractRecord foreignKeys, ForeignReferenceMapping mapping, AbstractSession session)

Overrides org.eclipse.persistence.internal.queries.ContainerPolicy.valueFromPKList.

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.

Annotations
@Override