commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Young <lyo...@dalmatian.com>
Subject [Betwixt] object mapping question
Date Mon, 19 May 2003 18:12:19 GMT
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 



Mime
View raw message