Re: Some ideas extending Cayenne

From: Adrian Wiesmann (awiesman..omap.org)
Date: Tue Aug 14 2007 - 10:22:24 EDT

  • Next message: Mike Kienenberger: "Re: Some ideas extending Cayenne"

    Hello Andrus

    Thanks for your help.

    > What is a typed key? Is it a custom Java class used for PK? If so,
    > you sort of can do that by mapping a meaningful PK and using an
    > ExtendedType to map a custom class for PK.

    Yes, I meant a strong typed class for every primary key. Sounds like
    ExtendedType is what I am looking for.

    Talking about generating classes from a DataMap. What would be the best
    way to generate personalised classes from a DataMap? I want to create at
    least two classes per DataObject. Would writing my own set of Velocity
    template transformations make sense? Or did I miss some hook in Cayenne
    which I could use? Afaik the cgen Ant task is not that flexible?

    > There are two more extension points in Cayenne 3.0 that may help you
    > to do that - custom queries and ObjectContext decorators (so you may
    > intercept certain queries/operation and rewrite them to your liking).
    > So essentially it should be possible to build what you are describing
    > as a complimentary module to Cayenne first, and then see if it is
    > worth integrating it in the core.

    ObjectContext decorator is probably what I am looking for. The only
    problem is that this decorator works on the whole ObjectContext and not on
    DataObject level. But that is solveable and I will try this one out.

    > Many people did (I even started a project called JStaple that never
    > took off). Not sure if anybody succeeded in building something usable
    > though.

    Yes, I am wondering why there is nothing for Swing. Although the DataViews
    are cool, they somewhat are limited. I have worked now some time with a
    framework which builds an object tree based on some xml syntax, binds the
    data and then uses that tree to render HTML and PDF. But why not render
    Swing as well. Swing is not that different...

    I guess I have to try this out, interested adventurers are welcome :)

    Regards,
    Adrian



    This archive was generated by hypermail 2.0.0 : Tue Aug 14 2007 - 10:22:53 EDT