Has someone worked on getting the create-method attribute to assume an
input parameter of the value of the xml element (much like the set-method)
? If not, I'm tempted to work on it. Any tips - warnings/suggestions ?
Your help is much appreciated.
Thanks,
Yuan
Yuan Chiu
<yuanchiu@yah To: [EMAIL PROTECTED]
oo.com> cc:
Subject: [castor-dev] create-method mapping to unmarshall xml
09/19/2001
01:41 PM
Please
respond to
castor-dev
Hi all,
I need to unmarshall an xml element to an object
whose class has a
factory method which accepts a String argument. The
class has no public
constructor or setter method.
Does anybody know how to unmarshall this element ?
It seems like the
create-method attribute assumes no input argument.
Any help will be greatly appreciated. Below is a
simplified example of
the code.
*****************************
xml file:
<? xml version 1.0 ?>
<State code="IL" />
*****************************
Object model:
public final class State
private String _code, _name;
private State(String code, String name)
_code=code; _name=name;
public static State find(String code)
return (State)lookup.get(code);
private static HashMap lookup = new HashMap();
This message was posted using eunum
To interact with a real-time, threaded interface to this e-mail list, clickthe link below:
[EMAIL PROTECTED]
