Special handling of very large XSD enumerations

Due to limitations in the Java language for some types of code generation, very large enumerations are handled differently from most enumerations. If an XSD defines an enumeration (an <xs:enumeration> element) with more than 2000 entries, PolicyCenter converts the enumeration to a String value (an <xs:string> element).

This conversion affects your Gosu code that uses the enumeration, as well as the overall type safety of related code. In addition to changing the type of any relevant properties, the Gosu compiler cannot perform compile-time verification of the individual enumeration values. For example, if you set a property of that enumeration type, be careful to spell the value correctly. If any changes to the XSD remove an enumeration value, setting that value does not cause an automatic compilation error.

During code generation on the command line or within Studio, you will see messages that identify substitutions due to this issue:

********************************************************************************
Java enum limit exceeded. Treating xs:enumeration as String
As a result there will not be static typing for this enumeration.
[gw/accelerators/test/common/xsd/test/TestLocationService_CodeExt_2013-10-17.xsd]
[gw/accelerators/test/common/xsd/test/TestLocationService_CodeExt_2013-10-17
   /types/simple/LineItemMotorcycleCategoryClosedEnumType.java]
3434 entries found
********************************************************************************