|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value={METHOD,PARAMETER})
@Retention(value=RUNTIME)
public @interface MOEnumSet
Defines an alternate mapping of Set of Enum using an boolean XML attribute for each
enumeration option.
given the following mapping
@MOProperty(xmlOrder = 6, xmlName = "properties2", xmlOptional = true)
@MOEnumSet(defaultValues={"hasPhone", "hasCard"})
public Set<EmployeeProperties> getEmployeeProperties2() {
return employeeProperties2;
}
public enum EmployeeProperties {hasCar, hasPhone, hasCard}
the corresponding XML schema fragment will be
<xs:element name="properties2" minOccurs="0">
<xs:complexType>
<xs:attribute name="hasCar" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="hasPhone" type="xs:boolean" use="optional" default="true"/>
<xs:attribute name="hasCard" type="xs:boolean" use="optional" default="true"/>
</xs:complexType>
</xs:element>
MOProperty| Optional Element Summary | |
|---|---|
java.lang.String[] |
defaultValues
Optional default values for the property. |
public abstract java.lang.String[] defaultValues
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||