posted 20 years ago
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