• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get primarykey value from table  RSS feed

 
deepa sundaram
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,

Here is the method where I am passing employeeid as parameter to the finder method(findBYSAPEmployeeID) its returning a single row and I am getting that in header object.Using that I have to get ID column from the table which is a primarykey.(like header.getID()) but the thing is, ID is a primary key and I am not having the getter setters for that,

so I am doing headers.getPrimaryKey(),like below.
Long id=(Long)header.getPrimaryKey()
and passing this ID as a parameter to another method..

I want to know what I am doing is right?

Thanks
deepa

Paf_headerLocalHome headerHome =(Paf_headerLocalHome) lookup(Constants.REFERENCE_PAF_HEADER);
Paf_headerLocal header = null;
Paf_sequenceLocal seq=null;

try{
header = headerHome.findBySAPEmployeeID(employeeID);
Long id=(Long)header.getPrimaryKey() ;

return getTermPaf(id);
 
vikassheel gupta
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepa,
tell me the error and the application server u r used
so that i can help you
byeeeeeeeeeeeeee
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!