• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

HFE book, p.433

 
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I don't agree with sidenote of question 9.
Question:

Which are valid values for a cmr-field-type element?


Answer:

Either a local interface type, or a Collection or a Set of the local interface type


Isn't the first answer local interface type incorrect? To my sense, cmr-field-type may not contain a simple local interface type as value: in this case, we should use element <cmr-field-name>, shouldn't we?
Regards,
Cyril.
[ January 15, 2004: Message edited by: cyril vidal ]
 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Cyril:
I also don't think the side note is correct. The following can be found in the spec in section 10.3.13

The cmr-field-type element must be specified if the type of the cmr-field is java.util.Collection or java.util.Set.


I don't see what local interface types have to do with anything. They don't belong in the cmr-field-name element as you suggest. What belongs in the cmr-field-name element is clearly stated in the deployment descriptor dtd as follows, found in the spec in section 22.5

The cmr-field-name element specifies the name of a logical relation-ship field in the entity bean class. The name of the cmr-field must
begin with a lowercase letter. This field is accessed by methods whose
names consist of the name of the field specified by cmr-field-name in
which the first letter is uppercased, prefixed by �get� or �set�.


I hope this helps.
 
cyril vidal
Ranch Hand
Posts: 247
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Keith,

I don't see what local interface types have to do with anything. They don't belong in the cmr-field-name element as you suggest. What belongs in the cmr-field-name element is clearly stated in the deployment descriptor dtd as follows, found in the spec in section 22.5


you're totally right and i was totally wrong
Thanks for this precision,
Cyril.
 
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the side note is there just to let you know that the cmr field type can be a local componet interface or a Set/Collection of the interface.
But you know that you don't have to specify in the DD if the type is a local componet interface, the container will somehow figure out itself.
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Yi.

Originally posted by Yi Meng:
I think the side note is there just to let you know that the cmr field type can be a local componet interface or a Set/Collection of the interface.


The question does not ask what type can a cmr field be but what are valid values of the cmr-field-element. The side note in this case is misleading since local interface type is not a valid value of this element. Only java.util.Collection or java.util.Set are valid. Although it's true that cmr field types can be a local component interface, as you state.
 
Hey, check out my mega multi devastator cannon. It's wicked. It makes this tiny ad look weak:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic