Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 22432 invoked from network); 28 Oct 2005 19:25:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Oct 2005 19:25:53 -0000 Received: (qmail 45645 invoked by uid 500); 28 Oct 2005 19:25:52 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 45629 invoked by uid 500); 28 Oct 2005 19:25:52 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 45617 invoked by uid 99); 28 Oct 2005 19:25:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2005 12:25:51 -0700 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.142.16.245] (HELO a.mail.sonic.net) (64.142.16.245) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Oct 2005 12:25:48 -0700 Received: from webmail.sonic.net (a.webmail.sonic.net [64.142.100.132]) by a.mail.sonic.net (8.13.3/8.13.3) with ESMTP id j9SJPUcP028366 for ; Fri, 28 Oct 2005 12:25:30 -0700 Received: from 216.239.124.38 (SquirrelMail authenticated user reubenf) by webmail.sonic.net with HTTP; Fri, 28 Oct 2005 12:25:30 -0700 (PDT) Message-ID: <20059.216.239.124.38.1130527530.squirrel@webmail.sonic.net> Date: Fri, 28 Oct 2005 12:25:30 -0700 (PDT) Subject: enums & Ibatis From: reubenf@sonic.net To: user-java@ibatis.apache.org User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Are there any good strategies for using enums w/ Ibatis? Are there plans to directly support them, if not? I have been forcing my enums (which represent valid values of certain columns, e.g. status columns) to have a value(), e.g.: public enum Status { ... COMPLETE { public Integer value() { return 400; }}, COMPLETE_WITH_WARNINGS { public Integer value() { return 401; }}; public abstract Integer value(); } ...and then translating that before it gets to Ibatis, using value(). But this is a little non-optimal. Thanks Reuben