10.12.2012 Views

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

The Java EE 5 Tutorial (PDF) - Oracle Software Downloads

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Customizing JAXB Bindings<br />

518<br />

<br />

[ collectionType = "collectionType" ]<br />

[ fixedAttributeAsConstantProperty = "true" | "false" | "1" | "0" ]<br />

[ generateIsSetMethod = "true" | "false" | "1" | "0" ]<br />

[ enableFailFastCheck = "true" | "false" | "1" | "0" ]<br />

[ choiceContentProperty = "true" | "false" | "1" | "0" ]<br />

[ underscoreBinding = "asWordSeparator" | "asCharInWord" ]<br />

[ typesafeEnumBase = "typesafeEnumBase" ]<br />

[ typesafeEnumMemberName = "generateName" | "generateError" ]<br />

[ enable<strong>Java</strong>NamingConventions = "true" | "false" | "1" | "0" ]<br />

[ bindingStyle = "elementBinding" | "modelGroupBinding" ]<br />

[ ... ]*<br />

<br />

■ collectionType can be either indexed or any fully qualified class name that implements<br />

java.util.List.<br />

■ fixedAttributeAsConstantProperty can be either true, false, 1,or0. <strong>The</strong> default value<br />

is false.<br />

■ generateIsSetMethod can be either true, false, 1,or0. <strong>The</strong> default value is false.<br />

■ enableFailFastCheck can be either true, false, 1,or0.IfenableFailFastCheck is true<br />

or 1 and the JAXB implementation supports this optional checking, type constraint<br />

checking is performed when setting a property. <strong>The</strong> default value is false. Please note that<br />

the JAXB implementation does not support failfast validation.<br />

■ choiceContentProperty can be either true, false, 1,or0. <strong>The</strong> default value is false.<br />

choiceContentProperty is not relevant when the bindingStyle is elementBinding.<br />

<strong>The</strong>refore, if bindingStyle is specified as elementBinding, then the<br />

choiceContentProperty must result in an invalid customization.<br />

■ underscoreBinding can be either asWordSeparator or asCharInWord. <strong>The</strong> default value is<br />

asWordSeparator.<br />

■ typesafeEnumBase can be a list of QNames, each of which must resolve to a simple type<br />

definition. <strong>The</strong> default value is xs:NCName. See “Typesafe Enumeration Binding<br />

Declarations” on page 522 for information about localized mapping of simpleType<br />

definitions to <strong>Java</strong> typesafe enum classes.<br />

■ typesafeEnumMemberName can be either generateError or generateName. <strong>The</strong> default<br />

value is generateError.<br />

■ enable<strong>Java</strong>NamingConventions can be either true, false, 1,or0. <strong>The</strong> default value is true.<br />

■ bindingStyle can be either elementBinding,ormodelGroupBinding. <strong>The</strong> default value is<br />

elementBinding.<br />

■ can be zero or more javaType binding declarations. For more information, see<br />

“javaType Binding Declarations” on page 521.<br />

declarations are only valid in the annotation element of the top-level<br />

schema element. <strong>The</strong>re can only be a single instance of a declaration in any<br />

<strong>The</strong> <strong>Java</strong> <strong>EE</strong> 5<strong>Tutorial</strong> • June 2010

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!