| Prev | Next | J2EETM Developer's Guide
Entity Beans |
isIdentical method:
Account accta, acctb;
. . .
if (accta.isIdentical(acctb))
System.out.println("identical");
Or, the client can fetch and compare the primary keys of two entity beans:
String key1 = (String)accta.getPrimaryKey();
String key2 = (String)acctb.getPrimaryKey();
if (key1.compareTo(key2) == 0)
System.out.println("equal");