Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/339381"

Line 18: Line 18:
  
 
== Project Overview ==
 
== Project Overview ==
 +
 +
Currently, EclipseLink MOXy supports the mapping of Java fields and properties to XML.  Said another way; in order to map data to XML, the user must have an existing Java field or property to map.
 +
 +
To support multi-tenancy, we will be allowing the user to add additional mappings at runtime.  Because these new mappings would not have existing fields / properties on the Java class to map to, we will instead introduce the concept of a "flex field", where we can map the elements of a Java <tt>Map</tt> to XML.
 +
 +
'''Example'''
 +
 +
<source lang="java">
 +
@XmlRootElement
 +
public class Customer {
 +
 +
  @XmlAttribute
 +
  private String name;
 +
 +
  @XmlExtensions
 +
  private Map<String, Object>
 +
 +
}
 +
</source>
  
 
== Requirements ==
 
== Requirements ==

Revision as of 13:09, 23 March 2011

Design Specification: XML Flex Fields

ER 339381

Document History

Date Author Version Description & Notes
110323 Rick Barkhouse 1.00

Project Overview

Currently, EclipseLink MOXy supports the mapping of Java fields and properties to XML. Said another way; in order to map data to XML, the user must have an existing Java field or property to map.

To support multi-tenancy, we will be allowing the user to add additional mappings at runtime. Because these new mappings would not have existing fields / properties on the Java class to map to, we will instead introduce the concept of a "flex field", where we can map the elements of a Java Map to XML.

Example

@XmlRootElement
public class Customer {
 
   @XmlAttribute
   private String name;
 
   @XmlExtensions
   private Map<String, Object>
 
}

Requirements

Back to the top