Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle TopLink API Reference 10g Release 3 (10.1.3) B13698-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.toplink.ejb.cmp
Class EJBCollectionHelper

`java.lang.Object
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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1998, 2006, Oracle. All Rights Reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD