Re: Help with class generation templates

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun May 08 2005 - 12:19:37 EDT

  • Next message: Doychi: "Re: Help with class generation templates"

    To add to what Jürgen said, you can use existing templates as examples.
    They are located under your CAYENNE_HOME at src/cayenne/dotemplates.

    Also note that "classGen" is the only variable available during generation
    in Velocity context. "classGen" is an instance of ClassGenerator -
    http://objectstyle.org/cayenne/api/cayenne/org/objectstyle/cayenne/gen/ClassGenerator.html
    - and wraps an ObjEntity currently being processed.

    Andrus

    > cayenne uses velocity for class generation:
    > http://jakarta.apache.org/velocity/user-guide.html
    >
    > there are also some translations available
    >
    > The trick is to put some special java-objects to VelocityContext
    > so you can have a lot of functionality while using the template
    >
    >
    > cayenne-use..bjectstyle.org schrieb am 08.05.05 10:39:49:
    >>
    >> Hi All,
    >>
    >> I was wondering if there is some documentation some where on how to
    >> write templates for class generation? I've used google to look for
    >> instructions but I can't find anything.
    >>
    >> Ta,
    >> --
    >> Doychi
    >
    >
    > ______________________________________________________________
    > Verschicken Sie romantische, coole und witzige Bilder per SMS!
    > Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193



    This archive was generated by hypermail 2.0.0 : Sun May 08 2005 - 12:19:39 EDT