Re: [Simple-support] Enhancement request
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2007-06-04 19:47:25
|
Hi,
I think its a reasonable enhancement. I really should have added this in the original implementation. Ill make sure to add it to the next release 1.3.1.
Niall
----- Original Message ----
From: Marco Vergari <ve...@zh...>
To: sim...@li...
Sent: Monday, June 4, 2007 12:12:22 PM
Subject: [Simple-support] Enhancement request
Hi
I found your Simple XML serialization framework. It's a great software.
It saved me a lot of work.
When I use the "@Commit" annotation the methode must be declared public.
I want that this methode is only accessible for the simple xml
serializer. I want to declare the methode private. For this the
setAccessible(true) methode must be called before the methode is
invoked. Otherwise IllegalAccessException will be thrown.
For me I have patched the class simple.xml.load.Schema as following:
public void commit(Object source) throws Exception {
if(commit != null) {
commit.setAccessible(true); //Patch: So you can invoke private methode
if(isContextual(commit)) {
commit.invoke(source, table);
} else {
commit.invoke(source);
}
}
}
The same I have done for the annotation "@Validate", "@Persist" and
"@Complete".
Wath do you think about this enhancement?
Best Regards,
Marco
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/
|