Hi,
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.
--- Jürgen ---
Mike Kienenberger <mkienen..laska.net> schrieb am 28.10.04 21:57:44:
> > 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.
>
> 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).
>
> -Mike
__________________________________________________________
Mit WEB.DE FreePhone mit hoechster Qualitaet ab 0 Ct./Min.
weltweit telefonieren! http://freephone.web.de/?mc=021201
This archive was generated by hypermail 2.0.0 : Fri Oct 29 2004 - 02:14:06 EDT