com.legstar.base.generator.java.field.hbs Maven / Gradle / Ivy
{{~#if complexType}}
CobolComplexType {{@key}} = new CobolComplexType.Builder()
.name("{{complexTypeName}}")
.fields(create{{complexTypeName}}Fields())
{{~#if dependingOn}}
.dependingOn("{{dependingOn}}"){{/if}}
.build();
{{~#if maxOccurs}}
CobolArrayType {{@key}}Array = new CobolArrayType.Builder()
.itemType({{@key}})
.minOccurs({{minOccurs}})
.maxOccurs({{maxOccurs}})
{{~#if dependingOn}}
.dependingOn("{{dependingOn}}"){{/if}}
.build();
fields.put("{{@key}}", {{@key}}Array);
{{~else}}
fields.put("{{@key}}", {{@key}});
{{~/if ~}}{{!-- maxOccurs --}}
{{~else}}
{{~#if choiceType}}
CobolChoiceType {{@key}} = new CobolChoiceType.Builder()
.name("{{choiceTypeName}}")
.alternatives(create{{choiceTypeName}}Fields())
.build();
{{~#if maxOccurs}}
CobolArrayType {{@key}}Array = new CobolArrayType.Builder()
.itemType({{@key}})
.minOccurs({{minOccurs}})
.maxOccurs({{maxOccurs}})
{{~#if dependingOn}}
.dependingOn("{{dependingOn}}"){{/if}}
.build();
fields.put("{{@key}}", {{@key}}Array);
{{~else}}
fields.put("{{@key}}", {{@key}});
{{~/if ~}}{{!-- maxOccurs --}}
{{~else}}
{{cobolTypeName}}{{#if javaTypeName}} < {{javaTypeName}} >{{/if}} {{@key}} =
new {{cobolTypeName}}.Builder{{#if javaTypeName}} < {{javaTypeName}} >{{/if}}({{#if javaTypeName}}{{javaTypeName}}.class{{/if}})
{{~#if signed}}
.signed({{signed}}){{/if}}
{{~#if signLeading}}
.signLeading({{signLeading}}){{/if}}
{{~#if signSeparate}}
.signSeparate({{signSeparate}}){{/if}}
{{~#if totalDigits}}
.totalDigits({{totalDigits}}){{/if}}
{{~#if fractionDigits}}
.fractionDigits({{fractionDigits}}){{/if}}
{{~#if charNum}}
.charNum({{charNum}}){{/if}}
{{~#if minInclusive}}
.minInclusive({{javaTypeName}}.valueOf("{{minInclusive}}")){{/if}}
{{~#if maxInclusive}}
.maxInclusive({{javaTypeName}}.valueOf("{{maxInclusive}}")){{/if}}
{{~#if odoObject}}
.odoObject(true){{/if}}
{{~#if maxOccurs}}
.build();
CobolArrayType {{@key}}Array = new CobolArrayType.Builder()
.itemType({{@key}})
.minOccurs({{minOccurs}})
.maxOccurs({{maxOccurs}})
{{~#if dependingOn}}
.dependingOn("{{dependingOn}}"){{/if}}
.build();
fields.put("{{@key}}", {{@key}}Array);
{{~else}}
{{~#if dependingOn}}
.dependingOn("{{dependingOn}}"){{/if}}
.build();
fields.put("{{@key}}", {{@key}});
{{~/if ~}}{{!-- maxOccurs --}}
{{~/if ~}}{{!-- choiceType --}}
{{~/if ~}}{{!-- complexType --}}