Community
Participate
Working Groups
Currently MOXy supports the mapping of fields/properties to XML. This extension would extend this ability to entries of a Map. The API might look something like the following: @XmlRootElement public class Customer { @XmlAttribute private String name; @XmlExtensions private Map<String, Object> } If the user want to create a mapping for "age", then could configure it using MOXy's XML metadata. When the metadata is processed MOXy would recognize that the corresponding field did not exist and configure the mapping (accessor) to participate in the extensions Map.
Design Consideration: Care should be taken when designing this feature so that the implementation remains consistent with the implementation of DynamicEntity. For example one could think of a DynamicEntity consisting of nothing but flex fields.
Design Consideration: The map used to store flex data by MOXy, could also be the map used to store flex data by the ORM component.
Design Consideration: Should the map be allowed to store unmapped fields? Some reasons to allow this includes: 1. A valid flex field in ORM may not be a valid flex field in MOXy. 2. The map may be populated before the extension is configured in the runtime metadata.
Created attachment 192386 [details] Phase 1 code changes
Created attachment 192387 [details] Phase 1 test changes
Phase 1 Support for: * Direct mapping * Composite Object mapping * Composite Collection mapping * XML Join Nodes * IDREF mapping * xml-list * Any Element mapping
Created attachment 192390 [details] Phase 1 xsd changes
Created attachment 193277 [details] Phase 1 code changes
Created attachment 193278 [details] Phase 1 test changes
Created attachment 193525 [details] Phase 1 code changes
Created attachment 193526 [details] Phase 1 test changes
Feature complete for 2.3
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink