Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.ejb.cmp.wls11
Class EJBCollectionHelper

java.lang.Object
  extended byoracle.toplink.ejb.cmp.wls11.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, 2005 Oracle Corporation. All Rights Reserved.