Re: transient relations

From: Mike Kienenberger (mkienen..laska.net)
Date: Fri Oct 29 2004 - 10:04:12 EDT

  • Next message: Gentry, Michael: "RE: Small issue with modeler.bat (Win98)"

    > there are several own methods in my DataObject.
    > The problem comes up with my XML-Export-Class.
    > There I build an XML-Stream with all Attributes
    > and Relations of the DataObject. The process of
    > generating the xml informations is completely
    > driven by the repository. The other way would
    > be to analyze the DataObjects via reflection,
    > but the repository way is very fine for all
    > generic classes. Even if you think about
    > reporting, like JasperReports, such transient
    > informations are needed.

    Can you give a specific example? I don't think I understand what you're
    trying to do. An example might clear it up for me.

    -Mike

    =?iso-8859-1?Q? J=FCrgen=20Saar ?= <jsaa..eb.de> wrote:
    > > > I'm trying to design a transient relation, the List with the
    DataObjects
    > > will be build in the ObjEntity-Class.
    > > >
    > > > In the modeler there is no posibility to create only an ObjEntity. So
    I
    > > created a DbEntity, that does'n exists in the Database with an ObjEntity
    and
    > > overwrote the readProperty() to ensure that cayenne does no database
    read.
    > > >
    > > > Is this the only way, or is there a better way to design relationdata
    that
    > > are result of the business logic.

    > Mike Kienenberger <mkienen..laska.net> schrieb am 28.10.04 21:57:44:
    > > Not completely sure I follow what you're trying to do, but you can
    certainly
    > > add additional methods to your DataObject subclass to return whatever
    data
    > > you like.
    > >
    > > Ie, I have an Account object, and I added a "getAmountDue()" method to
    it
    > > that computes the balance for that account based on whether certain
    other
    > > data records exist in the database.
    > >
    > > I also have a User object that has a "getAvailableAccountsList" method
    that
    > > generates a list of Account objects based on business logic.
    > >
    > > public List getAvailableAccountsList()
    > > ...
    > >
    > > This particular relationship can't be modeled because
    "statusSortOrderValue"
    > > is a complex derived attribute of Account which cannot be expressed in
    SQL
    > > (or at least not in any easy way).



    This archive was generated by hypermail 2.0.0 : Fri Oct 29 2004 - 10:02:52 EDT