Re: [JIRA] Created: (CAY-964) Enum logging in SQL logs

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jan 16 2008 - 12:49:06 EST

  • Next message: Michael Gentry: "Re: [JIRA] Created: (CAY-964) Enum logging in SQL logs"

    Sorry for the email flood... I jumped the gun on enums. It will be
    inconsistent with the best Cayenne tradition of keeping the mapping
    completely separate form the code. So I'd say we'd have to map the
    stuff below in the DataMap... so we will have to add yet another
    mapping primitive :-/

    Andrus

    On Jan 16, 2008, at 7:42 PM, Andrus Adamchik wrote:

    >
    > On Jan 16, 2008, at 7:34 PM, Andrus Adamchik wrote:
    >
    >> public enum SomeArbitraryType {
    >>
    >> TYPE1, TYPE2, ...;
    >>
    >> ..numCode
    >> public String getCode() {
    >> // this is dumb, but demonstrates the idea
    >> return name() + "_CODE";
    >> }
    >> }
    >
    >
    > Or this:
    >
    > public enum SomeArbitraryType {
    >
    > ..bCode(value="X")
    > TYPE1,
    >
    > ..bCode(value="Y")
    > TYPE2, ...;
    > }
    >
    > Andrus
    >



    This archive was generated by hypermail 2.0.0 : Wed Jan 16 2008 - 12:49:38 EST