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