Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 52881 invoked from network); 19 May 2003 22:52:33 -0000 Received: from unknown (HELO www.dalmatian.com) (69.0.129.67) by daedalus.apache.org with SMTP; 19 May 2003 22:52:33 -0000 Received: from flplcy.dalmatian.com ([207.224.179.140]) by www.dalmatian.com (8.9.3/8.9.3) with ESMTP id OAA11227 for ; Mon, 19 May 2003 14:19:46 -0700 Message-Id: <5.2.0.9.0.20030519142244.00a1abd0@mail.dalmatian.com> X-Sender: lyoung@mail.dalmatian.com X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 19 May 2003 14:22:47 -0700 To: commons-user@jakarta.apache.org From: Larry Young Subject: [Betwixt] object mapping question Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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