Re: Generic DataObjects?

From: Jonathan Carlson (Jonathan.Carlso..atun.com)
Date: Thu Dec 08 2005 - 15:53:22 EST

  • Next message: Ahmed Mohombe: "Re: Generic DataObjects?"

    Thanks! Very cool.

    Along with db.apache.org's DDLUtils (I know, it uses a different XML
    format) one could feasibly put together a database management web app
    with a dynamic webapp builder (using Cayenne generic record
    functionality for data access) and a dynamically compilable scripting
    language like Groovy for the custom code.

    (Sigh, I always have more ideas than time. I'm getting the webapp
    builder going pretty well, though... in my minimal free time using
    Wicket :-)

    - Jonathan

    >>> andru..bjectstyle.org 2005-12-08 2:31:22 PM >>>
    To expand on what Mike just said, right now a class generation /
    compilation step is needed. Functionality similar to EOF
    EOGenericRecord was requested before, but the main stumbling block
    was the requirement that two different entities had to be of two
    different classes. In other words a single Java class couldn't be
    mapped to multiple entities.

    This is about to change. In yet unreleased 1.2M9 we moved away from
    that (for an unrelated reason) and now ObjectId and the rest of the
    access stack uses String entity name as the entity type indicator. So

    we may actually get EOGenericRecord functionality for free as a
    result of this change, though extra testing is required to be
    entirely sure.

    Andrus

    On Dec 8, 2005, at 10:45 PM, Mike Kienenberger wrote:
    > Yes, I would think it'd be possible to do this, but you're actually
    > talking about doing two different and unrelated things.
    >
    > As for creating new data maps and entity representations, it is a
    > matter of creating DataDomain/DataMap/ObjEntity/DbEntity instances
    > with code rather than loading them from an xml file.
    >
    > The generated entity classes are just convenience classes to make
    > working with your data easier and typesafe. If you look at the
    code
    > of the generated classes, it just delegates those calls back to
    > CayenneDataObject, passing the attributes as strings. It works
    like
    > EOGenericRecord if you're familiar with EOF.
    >
    > On 12/8/05, Jonathan Carlson <Jonathan.Carlso..atun.com> wrote:
    >> Just curious,
    >>
    >> Is it possible to define a database mapping using generic
    DataObjects
    >> instead of a subclass? I'm just curious how dynamic Cayenne is,
    >> or if
    >> some class compilation is necessary to add support for a new table.
    >>
    >> Thanks,
    >>
    >> - Jonathan

    ______________________________________________________________________
    This email has been scanned by the MessageLabs Email Security System.
    For more information please visit http://www.messagelabs.com/email
    ______________________________________________________________________

    ______________________________________________________________________
    This email and any files transmitted with it are confidential and
    intended solely for the use of the individual or entity to whom they
    are addressed. If you have received this email in error please notify
    the system manager.

    Katun Corporation -- www.katun.com
    _____________________________________________________________________



    This archive was generated by hypermail 2.0.0 : Thu Dec 08 2005 - 15:53:28 EST