-----Original
Message-----
From: Serge
Simard [mailto:serge.simard@xxxxxxx]
Sent: Wednesday, January 26, 2005 8:06
PM
To:
user@xxxxxxxxxxxxxxxxxxx
Subject: RE: Implementation
Pluggability
You
can use a schema configuration file (.xsdconfig) to specify an extension
class to be called when set get calls occur :
1) Put
such a directive for the compiler to generate the callbacks in your schema
generated classes :
<xb:config
xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config"
xmlns:dto="http://www.cgi.com/awfm/dto">
<xb:extension for="">
<xb:prePostSet>
<xb:staticHandler>fully qualified name of the class the implements the
callback static functions</xb:staticHandler>
</xb:prePostSet>
</xb:extension>
</xb:config>
2)
implement a class for the call backs…
public static void postSet(int opType, XmlObject xo, QName propertyName,
boolean isAttr, int index)
public static boolean preSet(int opType, XmlObject xo, QName prop, boolean
isAttr, int index)
3)
Check xmlbeans for actual and recent info, but this works for
1.0.3…
Good
luck…
-----Original
Message-----
From: Sudhir
Srinivas [mailto:sudhir.srinivas@xxxxxxxxxx]
Sent: January 26, 2005 10:49
PM
To:
user@xxxxxxxxxxxxxxxxxxx
Subject: Implementation
Pluggability
I am investigating the use of
XML Beans on a project and I had the following question - I have the
requirement to be able to intercept the getX and getY calls and add custom
logic. Is there anyway in which this can be accomplished - like generating a
custom sub class ( my sub class) of
org.apache.xmlbeans.impl.values.XmlObjectBase ?