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

B32476-04

oracle.toplink.ejb.cmp
Class EJBCollectionHelper

java.lang.Object
  extended by oracle.toplink.ejb.cmp.EJBCollectionHelper
Direct Known Subclasses:
EJBCollectionHelper

public class EJBCollectionHelper
extends java.lang.Object


Constructor Summary
EJBCollectionHelper()
          EJBIndexer constructor comment.
 
Method Summary
static boolean contains(javax.ejb.EJBObject ejbObject, java.util.Vector vector)
          With vectors of EJBObjects you cannot use the regular contains() method since this will use the .equals() method for comparing EJBObjects which is not valid - isIdentical should be used instead.
static int indexOf(javax.ejb.EJBObject ejbObject, java.util.Vector vector)
          When dealing with collections of EJBObjects, it is wrong to use standard Vector methods such as indexOf() because these use .equals insead of the ejb method .isIdentical().
static boolean remove(javax.ejb.EJBObject ejbObject, java.util.Vector vector)
          With vectors of EJBObjects you cannot use the regular contains() method since this will use the .equals() method for comparing EJBObjects which is not valid - isIdentical should be used instead.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBCollectionHelper

public EJBCollectionHelper()
EJBIndexer constructor comment.

Method Detail

contains

public static boolean contains(javax.ejb.EJBObject ejbObject,
                               java.util.Vector vector)
With vectors of EJBObjects you cannot use the regular contains() method since this will use the .equals() method for comparing EJBObjects which is not valid - isIdentical should be used instead.

Parameters:
ejbObject - javax.ejb.EJBObject
vector - java.util.Vector

indexOf

public static int indexOf(javax.ejb.EJBObject ejbObject,
                          java.util.Vector vector)
When dealing with collections of EJBObjects, it is wrong to use standard Vector methods such as indexOf() because these use .equals insead of the ejb method .isIdentical(). This method will return the index of the given ejbObject within the given collection. If isIdentical fails for all elements of the collection, a value of -1 is returned. (This is what Vector does also).

Parameters:
ejbObject - javax.ejb.EJBObject
vector - java.util.Vector
Returns:
int

remove

public static boolean remove(javax.ejb.EJBObject ejbObject,
                             java.util.Vector vector)
With vectors of EJBObjects you cannot use the regular contains() method since this will use the .equals() method for comparing EJBObjects which is not valid - isIdentical should be used instead.

Parameters:
ejbObject - javax.ejb.EJBObject
vector - java.util.Vector

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