• Post Reply Bookmark Topic Watch Topic
  • New Topic

entity bean primary key

 
vijay ks
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using entity bean(CMP). The spec mandates that entity bean component interface should use getPrimaryKey() wich takes single argument.If i am having a customer table that has 4 columns. CUS_ID,CUS_ROLE,CUS_FNAME,CUS_LNAME.
In this CUS_ID,CUS_ROLE both has combined as a primary key, in that case how the getPrimarykey will works
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35709
408
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijay,
You would have a primary key class containing all the fields of the primary key. Then it works just as if your key was a String.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!