Mapping between the property name of a DynamicType and the Java Class name [message #1781958] |
Thu, 15 February 2018 10:41 |
Raghavendra Sharma Messages: 2 Registered: February 2018 |
Junior Member |
|
|
Hi,
I AMworking on Eclipse Link Jaxb for one of my projects and am stuck at a point. I would appreciate if the forum could help me on how to proceed with it.
I am trying recursively read all the xsd tags and persist them to db.
From DynamicJaxB context, I am not able to find a mapping between the property name of a DynamicType and the Java Class name of the corresponding DynamicEntity.
Taking the example Example 15-32 Creating the Dynamic Entity from http://www.eclipse.org/eclipselink/documentation/2.5/solutions/jpatoxml006.htm, I need to create a mapping between "address" in line 3 and "org.example.Address" in line 1
******************************************
1 ---->DynamicEntity address = jaxbContext.newDynamicEntity("org.example.Address");
2 ---->address.set("street", "1 Any Street").set("city", "Any Town");
3 ---->customer.set("address", address);
******************************************
Please advise if I could achieve this through some solution.
Thank You for Your valuable inputs.
Raghav
|
|
|
Powered by
FUDForum. Page generated in 0.02943 seconds