• 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

splitting get and set methods in JAXB

 
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Is there any way in JAXB, that we can define in xsd or xjb, that only get methods are generated or set methods are generated, but not both. Ideally I want to do this:
Imyinterface1 defines get methods.
Imyinterface2 defines set methods and extends Imyinterface1
Myclass implements Imyinterface2.
This would allow me to pass Imyinterface1 objects around to get access to data but not to be able to write, i.e. read only bean. If I have need read-write access then I have to pass Imyinterface2. All get/sets can be implemetned in Myclass.
Please let me know if we can achieve this using JAXB code generation process.
Thanks in advance.
Nilesh Patel
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I dont any such option being available..How about modifying the generated java bean classes.? :roll:
 
reply
    Bookmark Topic Watch Topic
  • New Topic