cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr.abanjo <>
Subject How to create cayenne datamap on the fly
Date Fri, 06 Jul 2007 22:12:57 GMT
Hi all,
i'm writing an application that try to be indipendent from the business
logic required.
The main idea behind this project is to use reflection to create on the fly
the bean (CayenneDataObject) that normally i must write for map the databese
What i need is:
1) load cayenne data map xml from a URL. Basically this URL point to a
servlet that generate it on the fly. Normally this is the configuration in

<map name="datamap-foo" location="META-INF/" />

whant i need is something like this:

 <map name="datamap-foo" location="
http://somedomain/" />

is it possible?

2) i need to generate some DataObject on the fly. So i'm thinking to use
Reflection. Do you think that is possible?  The main idea is that at runtime
i don't know the structure of my entity. For example, "user" can be composed
only by "name" and "surname" attribute... or... have also "address".. and so
on. I don't want to create every time the corresponding DataObject. I want
to implements an engine that create them on demand.

I don't know if this is a right approch on the problem. Maybe cayenne has
some API for doing this type of activity.

Thanks in advance, for help.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message