Re: 'EOReporter -modeldoc' (and maybe -groupdoc) options for cgen?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Mon May 23 2005 - 16:27:39 EDT

  • Next message: Mike Kienenberger: "Re: Incorporating VPP code into cgen"

    No suggestions on the synatx yet...

    But what you are building here has synergy with another generation feature
    that I was planning - a Java class (probably one per DataMap) with static
    method calls wrapping all Modeler Queries (as queries may or may not have
    a root entity, they have to be at the DataMap level).

    In fact I have this functionality in WebObjects wrapper of cgen - wogen -
    all WO fetch specs are generated as static methods with named parameters.
    It would be cool to have a similar option in Cayenne.

    Andrus

    > Does anyone have suggestions on the syntax for adding "EOReporter
    > -modeldoc" (and maybe -groupdoc) to cgen?
    >
    > -modeldoc generates a single output file, providing access to all
    > entities. -groupdoc generates a single output file, providing access to
    > all models (Cayenne DataMaps).
    >
    > This is useful for when you need to create a template to do something
    > like this:
    >
    > #foreach ($objEntity in $objEntityList)
    > public ${objEntity} create${objEntity}();
    > #end
    >
    > I was thinking maybe a mode="entity" (default), mode="datamap" cgen
    > attribute.
    >
    > For objEntityList, I'm looking at something like:
    >
    > #set( $objEntityList = $entityUtils.getEntityResolver().getObjEntities()
    > )
    >
    > although I'm wondering if having a mode="selected ObjEntities" (yucky
    > name) should be provided, in which case, I should probably provide
    > $entityUtils.getObjEntities() in addition.
    >
    > -Mike



    This archive was generated by hypermail 2.0.0 : Mon May 23 2005 - 16:27:43 EDT