Tuesday, January 17, 2006

Getting Primary Key Value (Custom Finder Method)

I created a session facade for my entity beans. In my entity beans apart from the findByPrimaryKey method I had a another finder method, based on another two attributes of the entity bean. Now the problem was how to get the value of the primary key, when i ran this finder method.

The solution:
Key seqKey = () ejbLocal.getPrimaryKey);
use: seqKey.

pretty simple for those who know...

0 Comments:

Post a Comment

<< Home