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

B32476-03

oracle.toplink.indirection
Class EJBIndirectSet

java.lang.Object
  extended by oracle.toplink.indirection.IndirectSet
      extended by oracle.toplink.indirection.EJBIndirectSet
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.Set, ChangeTracker, CollectionChangeTracker, IndirectCollection, IndirectContainer

public class EJBIndirectSet
extends IndirectSet

EJBIndirectSet provides all the functionality of IndirectSet 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:
IndirectSet, Serialized Form

Constructor Summary
EJBIndirectSet()
          Construct an empty IndirectSet.
EJBIndirectSet(java.util.Collection c)
          Construct an IndirectSet containing the elements of the specified collection.
EJBIndirectSet(int initialCapacity)
          Construct an empty IndirectSet with the specified initial capacity.
EJBIndirectSet(int initialCapacity, float loadFactor)
          Construct an empty IndirectSet with the specified initial capacity and load factor.
 
Method Summary
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection c)
           
 boolean remove(java.lang.Object o)
           
 
Methods inherited from class oracle.toplink.indirection.IndirectSet
add, addAll, clear, clone, equals, hashCode, isEmpty, isInstantiated, iterator, removeAll, retainAll, size, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EJBIndirectSet

public EJBIndirectSet()
Construct an empty IndirectSet.


EJBIndirectSet

public EJBIndirectSet(int initialCapacity)
Construct an empty IndirectSet with the specified initial capacity.

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

EJBIndirectSet

public EJBIndirectSet(int initialCapacity,
                      float loadFactor)
Construct an empty IndirectSet with the specified initial capacity and load factor.

Parameters:
initialCapacity - the initial capacity of the set
loadFactor - the load factor of the set
Throws:
java.lang.IllegalArgumentException - if the specified initial capacity is negative

EJBIndirectSet

public EJBIndirectSet(java.util.Collection c)
Construct an IndirectSet containing the elements of the specified collection.

Parameters:
c - the initial elements of the set
Method Detail

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection
Specified by:
contains in interface java.util.Set
Overrides:
contains in class IndirectSet
See Also:
Set.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.Set
Overrides:
containsAll in class IndirectSet
See Also:
Vector.containsAll(java.util.Collection)

remove

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

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