This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

primary key class of entity beans?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(1) If entity bean operations are on two tables like employee and department then do we need two primary key classes? each for one table?
is it one primary key class for one table?

(2) is primary key class creation is compulsory for table handling in entity beans? If I am doing creation of entity / record then do I need to put setter methods for all fields of that table in primary key class.

(3) in data discriptor if primary key field is filled then do we need to fill <ejb-ql> with select statement.
what I am assuming is either primary key field or ejb-ql any one can present in DD. is it?

Thanks,
Yamini.
 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Yamini,

(1) If entity bean operations are on two tables like employee and department then do we need two primary key classes? each for one table?

There is no requirement that each table needs a separate primary key clss. If your business allows you can have a single primary key class for both the tables.
But the main requirement is, primary class fields should be the subset of cmp fields.

(2) is primary key class creation is compulsory for table handling in entity beans? If I am doing creation of entity / record then do I need to put setter methods for all fields of that table in primary key class.

It is not compulsory to have create separate primary key class, if the primary key field is one of the cmp field, then you don't need separate primary key class.
Requiments are, <prim-key-class> field is must in the deployment descriptor.
If your primary key is compound key means, primary key is combination of two or more cmp fields, then you need a separate primary key class.

(3) in data discriptor if primary key field is filled then do we need to fill <ejb-ql> with select statement.
what I am assuming is either primary key field or ejb-ql any one can present in DD. is it?.


I have not understood you question fully. I don't think so, Is there any relation between <ejb-ql> and primary key field.

Thanks,
[ September 03, 2004: Message edited by: Narasimha Rao B. ]
 
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic