[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] MOXy with arbitary fields
|
Hi Doug,
Cool! This is just what I need. Thanks!! :D
--Polly
On Fri, May 29, 2009 at 8:19 AM, Douglas Clarke
<DOUGLAS.CLARKE@xxxxxxxxxx> wrote:
Polly,
The
requirement is that EclipseLink have a unique class to use. We use ASM
internally for dynamically creating classes for SDO and
DBWS.
I have
recently published a simple-map example using dynamically created classes to map
to database tables created on the fly.
Using
this pattern you could create object-xml mappings. Look in:
Doug
-----Original Message-----
From: amphoras
[mailto:amphoras@xxxxxxxxx]
Sent: Thursday, May 28, 2009 12:42
PM
To: EclipseLink User Discussions
Subject: Re:
[eclipselink-users] MOXy with arbitary fields
Hi
Blaise,
Thanks for the hint about using something like ASM.to create
the empty subclass per descriptor. Is ASM most compatible with
EclipseLink, or would any of the byte code manipulation tools like CGLib,
Javassist, or BCEL work? I have not used any of these libraries before,
so I'm not sure which one would be best for the job.
Thanks!
--Polly
On Mon, May 25, 2009 at 5:07 PM, Blaise Doughan
<blaise.doughan@xxxxxxxxxx>
wrote:
Hi
Polly,
In terms of the dynamic object. EclipseLink works best
if there is a one-to-one relationship between classes and descriptors.
A common strategy to is to have your dynamic object and then use ASM
to create an empty subclass per descriptor. This sounds inline with
what you were already thinking.
For the dynamic mapping portion you
could create the mappings programmatically. Do you have a simple proof
of concept in mind that we could base the discussion on?
-Blaise
polly.c.chang wrote:
Hi,
I've
been using EclipseLink MOXy for a while now and love it. I know how
to
define mappings for domain objects to schemas using the deployment
XML file. A recurring question has come up for an alternate use case
though. The
problem is sometimes we have a more dynamic use case
where we don't know
ahead of time what fields we'll need to map from
the schema. We also don't
have a domain object to map to.
For the object part, we would probably need
to use some kind of
map of maps. If EclipseLink does not support that, I
think we can
create a DynaBeans sort of wrapper object to trick MOXy into
thinking
that the map-of-maps a nested object graph. But I am not sure
what
to do about not knowing the xpaths a priori. How would I
define the
mappings? Is the solution to programmatically create
mappings directly
using the
API?
Thanks!
--Polly
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users