An undefined primary key allows the deployer to choose a system-specific key at deployment time.
For example, An object database, uses a completely different mechanism for indexing objects, to which a primary key may not map well.
To facilitate the use of undefined primary keys, the CMP bean class and its interfaces use the Object type to identify the primary key. The findByPrimaryKey() method defined in the local and remote home interfaces must also use an Object type. The deployment descriptor defines its primary key type as java.lang.Object and does not define any <prim-key-field> elements it's not possible to construct an undefined primary key to use in a find method if you don't know its type.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
...watch me...as I'm walking the path...
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |