oracle.toplink.indirection
Class EJBIndirectSet
java.lang.Object
oracle.toplink.indirection.IndirectSet
oracle.toplink.indirection.EJBIndirectSet
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, IndirectContainer, java.io.Serializable, java.util.Set
- 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 |
equals(java.lang.Object o)
|
boolean |
remove(java.lang.Object o)
|
boolean |
removeAll(java.util.Collection c)
|
boolean |
retainAll(java.util.Collection c)
|
Methods inherited from class oracle.toplink.indirection.IndirectSet |
add, addAll, clear, clone, getValueHolder, hashCode, isEmpty, isInstantiated, iterator, setValueHolder, size, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
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
contains
public boolean contains(java.lang.Object o)
-
- 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.Set
- Overrides:
containsAll
in class IndirectSet
-
- See Also:
Vector.containsAll(java.util.Collection)
equals
public boolean equals(java.lang.Object o)
-
- Specified by:
equals
in interface java.util.Set
- Overrides:
equals
in class IndirectSet
-
- See Also:
Set.equals(java.lang.Object)
remove
public boolean remove(java.lang.Object o)
-
- Specified by:
remove
in interface java.util.Set
- Overrides:
remove
in class IndirectSet
-
- See Also:
Set.remove(java.lang.Object)
removeAll
public boolean removeAll(java.util.Collection c)
-
- Specified by:
removeAll
in interface java.util.Set
- Overrides:
removeAll
in class IndirectSet
-
- See Also:
Set.removeAll(java.util.Collection)
retainAll
public boolean retainAll(java.util.Collection c)
-
- Specified by:
retainAll
in interface java.util.Set
- Overrides:
retainAll
in class IndirectSet
-
- See Also:
Set.retainAll(java.util.Collection)