com.abra.j2xb.annotations
Annotation Type MOPropertyGroup


@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.

Since:
JDK1.5
Version:
1.0, May 1, 2008
Author:
Yoav Abrahami
See Also:
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

value

public abstract java.lang.String value
The group path, where each grouping level is separated with a '/' character (as a path)



Copyright © 2008. All Rights Reserved.