Re: Enums

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Thu Aug 09 2007 - 09:25:48 EDT

  • Next message: Michael Gentry: "Re: Enums"

    On Aug 9, 2007, at 4:12 PM, Michael Gentry wrote:

    > Yes, that is currently how I've done it -- although with Java 1.4 and
    > my own enumeration stuff. I have to manually register my enums with
    > Cayenne on startup. (Typing in the enumerated value in the modeler
    > doesn't auto-initialize them and make them available -- they have to
    > be individually registered with the DataNode --
    > node.getAdapter().getExtendedTypes().registerType(...).)

    With native Java 5 enums, this is automatic. I understand there's no
    plan to support your custom enums going forward? Java built-in enums
    should be enough, right?

    > I'd like another section in the modeler where you define enumerated
    > values, just as you define classes.

    But why? An enum is a Java class (sort of). Other than the class
    name, Cayenne doesn't need to know anything about it. So such mapping
    seems redundant.

    Andrus



    This archive was generated by hypermail 2.0.0 : Thu Aug 09 2007 - 09:26:10 EDT