Re: Cayenne Enumerations

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jun 14 2005 - 11:22:22 EDT

  • Next message: Mike Kienenberger: "Re: Cayenne Enumerations"

    But even with a template I still don't understand where would you get the
    enum info. E.g. if you have a color enum (RED -> 1, GREEN -> 2, BLUE ->
    3), there is nothing in the DataMap that would allow you to generate such
    class.

    Andrus

    > "Gentry, Michael (Contractor)" <michael_gentr..anniemae.com> wrote:
    >> I think it would be interesting to have Cayenne Modeler or a standalone
    >> tool/template that could somehow be used to generate the enumeration
    >> classes from a template, since they are pretty cookie-cutter, if given a
    >> data source. If anyone has ideas in this regard, please post them
    >> (remember, I'm an Objective-C hack trying to do some Java).
    >
    > For class generation, create a java class that provides or generates the
    > enumeration as a Collection, List, Iterator, Vector, or whatever. Use
    > cgen
    > v1.2 to add that class as a tool into the class generation velocity
    > context.
    > Modify the default template to #foreach over that enumeration.
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Jun 14 2005 - 11:22:23 EDT