|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Target(value=METHOD) @Retention(value=RUNTIME) public @interface MOPropertyGroup
Defines that a property be mapped as a child of a "group" element or elements in the XML representation.
When a property is mapped with this annotation, a series of XML elements are generated where the property value is written as the last child in the series. Each element in the series is treated as a grouping element, where grouping elements from multiple properties are merged when appropriate.
The groups are writted as a path like string, where the character '/' is used as a separator. For instance, the
string "one/two/three" is understood as three groups, the first beeing one
, the second two
nested within the first, and the third group three
within the second. The XML will appear like
<one> <two> <three> here will appear the property value mapping. </three> </two> </one>
Now if another property will be mapped using the same grouping (or partial grouping), the same elements
will be used in the XML representation. For instance, if another property uses the group string "one/two/four" or
even just "one", the same one
element will be used for both properties.
When writing the XML document, the grouping elements are created if at least one of the property values nested within them is writen. The grouping elements are mandatory unless all properties nested within them are optional, in which case the grouping element is optional.
MOProperty
Required Element Summary | |
---|---|
java.lang.String |
value
The group path, where each grouping level is separated with a '/' character (as a path) |
Element Detail |
---|
public abstract java.lang.String value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |