• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

setter/getter methods for primary key field

 
Steven Gao Song
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone

I wanna ask a question.
Is it possible that CMP entity bean component interface provides the client Setter method to the Primary-key fields?
 
Rodrigo Dinis
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its not in EJB spec. So the answer is: not.

Best regards,
 
Lukas Stephienn
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I don't agree with that. Bean may declare a primary key setter so ejbCreate method will invoke it.
Though setter of primary key cannot be invoked in place different than ejbCreate, it may be defined as normal persistent field of entity bean.

And if bean class contains such field, interface may also.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic