Accessing object metadata and other utilities

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Nov 24 2009 - 06:53:24 EST

  • Next message: Robert Zeigler: "Re: Accessing object metadata and other utilities"

    [As suggested in the parent thread, forking a new thread]

    On Nov 24, 2009, at 1:41 PM, Robert Zeigler wrote:

    > I'll second that. I ran into a very similar use case yesterday in a
    > hibernate project... I was wanting to get at hibernate's version of
    > ClassDescription, and it took me forever to track down the right way
    > to do it; once I knew how, it was simple enough, and just a few
    > lines of code, but I fear the above would cause a new Cayenne user
    > the same level of frustration I experienced yesterday with
    > Hibernate. ;)

    I wouldn't mind if we add methods for ClassDescriptor lookups to the
    DataObjectUtils. BTW PersistentObject defines 'getObjEntity' method.
    I'd say we replace that with 'getClassDescriptor' and move it to a
    utility class.

    While we are at it, maybe rename DataObjectUtils to something more
    appropriate and shorter. CayenneUtil? Cayenne? ("Util" is already
    taken, and I'd rather it identify the origin of the framework).

    I sort of like calling it just "Cayenne" (for the same reasons of user
    simplicity), but then it implies this is a central class in the
    framework, and has more than just lookup-by-pk or give-me-metadata
    methods.

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Nov 24 2009 - 06:54:18 EST