• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

return type for CMP/CMR fields

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have doubt regarding the return type of CMP/CMR fields.

CMP field:

1)no <field-type> tag in deployment descriptor.
2)Container will find from the abstract set and get methods

CMR fields

1)<CMR-FIELD-TYPE> tag availble in dd.
2)we need to declare the get and set abstract methods.

Why SUN handled CMR and CMP in different ways.
in case of CMR fileds why to have a seperate tag for return type
why cannot container finds from the abstract method return types.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The only reason there is a CMR-FIELD-TYPE is for java.util.Collection or java.util.Set. If your CMR is return not a single value but collection then the DD lets you specify what is the return type. You dont need the CMR-FIELD-TYPE for a single value return (Say you are returning a String) This it will get from the abstract method return type.

-Hope this helps.
 
Our first order of business must be this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic