The Artima Developer Community
Sponsored Link

Java Answers Forum
What is the significance of Primary key class in Entity bean?

1 reply on 1 page. Most recent reply: Jul 18, 2003 11:38 PM by zenykx

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
rclw

Posts: 1
Nickname: rclw
Registered: Jul, 2003

What is the significance of Primary key class in Entity bean? Posted: Jul 16, 2003 5:01 AM
Reply to this message Reply
Advertisement
What is the significance of Primary key class in Entity bean?

As I go through a book which says

The primary key class for an entity bean class is used by the EJB container to uniquely identify an entity bean object.Each EJB Object is uniquely identified by its primary key object and the home interface referance.

Since there is home interface to identify the EJB object then why do we need Primary key class???


zenykx

Posts: 69
Nickname: zenykx
Registered: May, 2003

Re: What is the significance of Primary key class in Entity bean? Posted: Jul 18, 2003 11:38 PM
Reply to this message Reply
Most of time entity beans got persisted in a database. As i suppose you know, a database row is identifyied by a primary key. So, in order your home interface to be able to retrieve the one and only entity bean you request you must uniquely identify it. So, you need a primary key.
Nice, ain't it!

Flat View: This topic has 1 reply on 1 page
Topic: Reading values from an array Previous Topic   Next Topic Topic: JTree node selection  small problem

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use