You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Larry Young <ly...@dalmatian.com> on 2003/05/19 20:12:19 UTC
[Betwixt] object mapping question
Hello,
I have a situation where I'm using the "type-safe enum" pattern
where an immutable object represents an enumerable value. These objects
never have public accessor/mutator methods since they are immutable, and
their ctor's are private so that the enclosing class can limit the list of
legal enum values. The object itself represents a particular enumerable
value, so simple "==" is used for testing.
One of the beans that I want to use with betwixt has a data member
which is one of these type-safe enum objects. My bean has "set/get"
methods for the enum object, but that object has no set/get methods of its
own, so all I get in the XML is an empty tag.
Is there a way to tell betwixt that for a particular datamember,
use a particular mapping for its values? Or, is there a class that betwixt
will use where I can extend and provide the custom mapping?
As a small side note, how does betwixt handle other immutable
types like Integer, Long, String?
Any help is greatly appreciated.
--- regards ---
Larry
--------------------------
Larry Young
The Dalmatian Group
www.dalmatian.com