• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question on CMP virtual persistent fields

 
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a CMP bean,is it possible to expose the abstract getters and setters in the bean class for the virtual persistent fields as business methods in the component interface?

One page in HFEJB says it is possible to do so, though it is not good practice as it does not follow encapsulation rules.

There is another page that says that business methods in the component interface MUST have concrete implementations in the bean class.

I think these 2 contradict. Which one is true? Is it possible to directly expose the abstract setters and getters to the client through the component interface if I don't have any validation or anything else to do before calling the setters for the virtual persistent fields?
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can have the getter & setter methods for the cmp virtual fields in the component interface except for setter methods of the primary key,
 
B.Sathish
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Praveen...that makes sense
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic