Top Methods
org.eclipse.persistence.internal.core.queries

public Interface CoreContainerPolicy<ABSTRACT_SESSION extends CoreAbstractSession>

Known Direct Subinterfaces
org.eclipse.persistence.internal.core.queries.CoreMappedKeyMapContainerPolicy
Known Direct Implementers
org.eclipse.persistence.internal.queries.ContainerPolicy
Imports
java.util.Vector, org.eclipse.persistence.internal.core.sessions.CoreAbstractSession, org.eclipse.persistence.internal.queries.ContainerPolicy, .MapContainerPolicy

Method Summary

Modifier and TypeMethod and Description
public boolean
addInto(Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Add element to container.

public boolean
addInto(Object key, Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Add element to container.

public void
clear(Object container)

INTERNAL: Remove all the elements from the specified container.

public Object
containerInstance()

INTERNAL: Return an instance of the container class.

public Object
containerInstance(int initialCapacity)

INTERNAL: Return an instance of the container class with the specified initial capacity.

public boolean
contains(Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Check if the object is contained in the collection.

public boolean
hasNext(Object iterator)

INTERNAL: Return whether the iterator has more objects.

public boolean
isEmpty(Object container)

INTERNAL: Return whether the container is empty.

public boolean
public Object
iteratorFor(Object container)

INTERNAL: Return an iterator for the given container.

public Object
next(Object iterator, ABSTRACT_SESSION session)

INTERNAL: Return the next object from the iterator.

public Object
nextEntry(Object iterator)

INTERNAL: Return the next object on the queue.

public Object
nextEntry(Object iterator, ABSTRACT_SESSION session)

INTERNAL: Return the next object on the queue.

public boolean
removeFrom(Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Remove the object from the collection.

public void
setContainerClass(Class<?> containerClass)

INTERNAL: Set the class used for the container.

public int
sizeFor(Object container)

INTERNAL: Return the size of container.

public Vector<E>
vectorFor(Object container, ABSTRACT_SESSION session)

INTERNAL: Return a Vector populated with the contents of container.

Method Detail

addIntoback to summary
public boolean addInto(Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Add element to container. This is used to add to a collection independent of JDK 1.1 and 1.2. The session may be required to wrap for the wrapper policy. Return whether the container changed

addIntoback to summary
public boolean addInto(Object key, Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Add element to container. This is used to add to a collection independent of type. The session may be required to wrap for the wrapper policy. Return whether the container changed.

clearback to summary
public void clear(Object container)

INTERNAL: Remove all the elements from the specified container. Valid only for certain subclasses.

containerInstanceback to summary
public Object containerInstance()

INTERNAL: Return an instance of the container class. Null should never be returned. A ValidationException is thrown on error.

containerInstanceback to summary
public Object containerInstance(int initialCapacity)

INTERNAL: Return an instance of the container class with the specified initial capacity. Null should never be returned. A ValidationException is thrown on error.

containsback to summary
public boolean contains(Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Check if the object is contained in the collection. This is used to check contains in a collection independent of JDK 1.1 and 1.2. The session may be required to unwrap for the wrapper policy.

hasNextback to summary
public boolean hasNext(Object iterator)

INTERNAL: Return whether the iterator has more objects. The iterator is the one returned from #iteratorFor(). Valid for some subclasses only.

See Also
ContainerPolicy#iteratorFor(Object)
isEmptyback to summary
public boolean isEmpty(Object container)

INTERNAL: Return whether the container is empty.

isListPolicyback to summary
public boolean isListPolicy()
iteratorForback to summary
public Object iteratorFor(Object container)

INTERNAL: Return an iterator for the given container. This iterator can then be used as a parameter to #hasNext() and #next().

See Also
ContainerPolicy#hasNext(Object), ContainerPolicy#next(Object, org.eclipse.persistence.internal.sessions.AbstractSession)
nextback to summary
public Object next(Object iterator, ABSTRACT_SESSION session)

INTERNAL: Return the next object from the iterator. This is used to stream over a collection independent of JDK 1.1 and 1.2. The session may be required to unwrap for the wrapper policy.

nextEntryback to summary
public Object nextEntry(Object iterator)

INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor(). In the case of a Map, this will return a MapEntry to allow use of the key

See Also
ContainerPolicy#iteratorFor(Object), MapContainerPolicy#unwrapIteratorResult(Object)
nextEntryback to summary
public Object nextEntry(Object iterator, ABSTRACT_SESSION session)

INTERNAL: Return the next object on the queue. The iterator is the one returned from #iteratorFor(). In the case of a Map, this will return a MapEntry to allow use of the key

See Also
ContainerPolicy#iteratorFor(Object), MapContainerPolicy#unwrapIteratorResult(Object)
removeFromback to summary
public boolean removeFrom(Object element, Object container, ABSTRACT_SESSION session)

INTERNAL: Remove the object from the collection. This is used to remove from a collection independent of JDK 1.1 and 1.2. The session may be required to unwrap for the wrapper policy.

setContainerClassback to summary
public void setContainerClass(Class<?> containerClass)

INTERNAL: Set the class used for the container.

sizeForback to summary
public int sizeFor(Object container)

INTERNAL: Return the size of container.

vectorForback to summary
public Vector<E> vectorFor(Object container, ABSTRACT_SESSION session)

INTERNAL: Return a Vector populated with the contents of container. Added for bug 2766379, must implement a version of vectorFor that handles wrapped objects.