Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-03

oracle.toplink.indirection
Class EJBIndirectList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by oracle.toplink.indirection.IndirectList
                  extended by oracle.toplink.indirection.EJBIndirectList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess, ChangeTracker, CollectionChangeTracker, IndirectCollection, IndirectContainer
Direct Known Subclasses:
EjbCollection

public class EJBIndirectList
extends IndirectList

EJBIndirectList provides all the functionality of IndirectList while being EJB friendly. That is, when it performs contains, remove, etc... with entity beans, the container uses the bean's 'isIdentical' method rather than the usual 'equals'.

This is necessary since serialization of the EJBObjects can cause the equality test to return false, even though they represent the same underlying entity bean.

Since:
TopLink Java 4.0
See Also:
EJBIndirectList, Serialized Form

Constructor Summary
EJBIndirectList()
          Construct an empty EJBIndirectList so that its internal data array has size 10 and its standard capacity increment is zero.
EJBIndirectList(java.util.Collection c)
          Construct an EJBIndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.
EJBIndirectList(int initialCapacity)
          Construct an empty EJBIndirectList with the specified initial capacity and with its capacity increment equal to zero.
EJBIndirectList(int initialCapacity, int capacityIncrement)
          Construct an empty EJBIndirectList with the specified initial capacity and capacity increment.
 
Method Summary
 boolean contains(java.lang.Object elem)
          
 boolean containsAll(java.util.Collection c)
           
 int indexOf(java.lang.Object elem)
           
 int indexOf(java.lang.Object elem, int startIndex)
           
 int lastIndexOf(java.lang.Object elem)
           
 int lastIndexOf(java.lang.Object elem, int startIndex)
           
 boolean remove(java.lang.Object o)
           
 boolean removeElement(java.lang.Object obj)
           
 
Methods inherited from class oracle.toplink.indirection.IndirectList
add, add, addAll, addAll, addElement, capacity, clear, clone, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, insertElementAt, isEmpty, isInstantiated, iterator, lastElement, listIterator, listIterator, remove, removeAll, removeAllElements, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EJBIndirectList

public EJBIndirectList()
Construct an empty EJBIndirectList so that its internal data array has size 10 and its standard capacity increment is zero.


EJBIndirectList

public EJBIndirectList(int initialCapacity)
Construct an empty EJBIndirectList with the specified initial capacity and with its capacity increment equal to zero.

Parameters:
initialCapacity - the initial capacity of the vector
Throws:
java.lang.IllegalArgumentException - if the specified initial capacity is negative

EJBIndirectList

public EJBIndirectList(int initialCapacity,
                       int capacityIncrement)
Construct an empty EJBIndirectList with the specified initial capacity and capacity increment.

Parameters:
initialCapacity - the initial capacity of the vector
capacityIncrement - the amount by which the capacity is increased when the vector overflows
Throws:
java.lang.IllegalArgumentException - if the specified initial capacity is negative

EJBIndirectList

public EJBIndirectList(java.util.Collection c)
Construct an EJBIndirectList containing the elements of the specified collection, in the order they are returned by the collection's iterator.

Parameters:
c - a collection containing the elements to be inserted into the list.
Method Detail

contains

public boolean contains(java.lang.Object elem)

Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.List
Overrides:
contains in class IndirectList
See Also:
Vector.contains(java.lang.Object)

containsAll

public boolean containsAll(java.util.Collection c)
Specified by:
containsAll in interface java.util.Collection
Specified by:
containsAll in interface java.util.List
Overrides:
containsAll in class IndirectList
See Also:
Vector.containsAll(java.util.Collection)

indexOf

public int indexOf(java.lang.Object elem,
                   int startIndex)
Overrides:
indexOf in class IndirectList
See Also:
Vector.indexOf(java.lang.Object)

indexOf

public int indexOf(java.lang.Object elem)
Specified by:
indexOf in interface java.util.List
Overrides:
indexOf in class IndirectList
See Also:
Vector.indexOf(java.lang.Object, int)

lastIndexOf

public int lastIndexOf(java.lang.Object elem)
Specified by:
lastIndexOf in interface java.util.List
Overrides:
lastIndexOf in class IndirectList
See Also:
Vector.lastIndexOf(java.lang.Object)

lastIndexOf

public int lastIndexOf(java.lang.Object elem,
                       int startIndex)
Overrides:
lastIndexOf in class IndirectList
See Also:
Vector.lastIndexOf(java.lang.Object, int)

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection
Specified by:
remove in interface java.util.List
Overrides:
remove in class IndirectList
See Also:
Vector.remove(java.lang.Object)

removeElement

public boolean removeElement(java.lang.Object obj)
Overrides:
removeElement in class IndirectList
See Also:
Vector.removeElement(java.lang.Object)

Copyright © 1998, 2010, Oracle. All Rights Reserved.