Generating additional Classes from an Entity with Velocity EOGenerator

From: David Avendasora (webobject..vendasora.com)
Date: Wed Mar 05 2008 - 04:53:44 EST

  • Next message: David Avendasora (JIRA): "[OS-JIRA] Created: (WOL-737) Entity Modeler preference changes don't stick across Eclipse Restarts"

    You set the package.name of the Client Class on the Advanced Tab for
    each Entity.

    The catch is that you also need to set each attribute and relationship
    as being a Client Class Property as well in order to get EOGenerator
    to add them to the client _Entity class file. There is a check box
    under the Advanced tab for each attribute and relationship to do this.

    The concept of each Entity having _one_ additional class with
    potentially different attributes/relationships that is copied to the
    client as part of a Java Client project is something that is part of
    the standard .eomodel spec. Allowing for additional classes for an
    Entity beyond that isn't. It looks like the .eomodel file _could_ be
    modified to contain additional class names, but it is going to take
    modifying Entity Modeler and Velocity EOGenerator to do it.

    Why do you want additional classes for each Entity? I have reasons for
    wanting a "common" class in addition to "server" and "client" ones and
    if there are others who want similar functionality we should work
    together on what the requirements would be so we can submit a feature
    request.

    Dave

    On Mar 4, 2008, at 11:46 PM, Mike Schrag wrote:

    > You can set the java client class on your entities, then check the
    > java client checkbox on the eogen file, which will cause it to
    > generate with the client class names instead of the class name. You
    > can also set a superclass package that gets appended to the base
    > package name and you could make the _Files go into a separate
    > package from the children.
    >
    > On Mar 4, 2008, at 7:17 PM, John Huss wrote:
    >
    >> I was trying to use two different .eogen files before to generate
    >> from two different templates and put the classes in different
    >> packages, but it wouldn't work because the file path (the package)
    >> was always the same for both sets of classes. How do you get the
    >> files into separate packages - like client and server?
    >>
    >> John
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Mar 05 2008 - 04:55:21 EST