ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reub...@sonic.net
Subject enums & Ibatis
Date Fri, 28 Oct 2005 19:25:30 GMT
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.


View raw message