All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.legstar.jaxb.generator.jaxb.wrappers.factory.field.get.hbs Maven / Gradle / Ivy

There is a newer version: 2.1.2
Show newest version
            case {{fieldIndex}}:
{{~#if complexType}}
{{~#if maxOccurs}}
                java.util.List < {{complexTypeName}}JaxbWrapper > {{@key}} = new java.util.ArrayList < {{complexTypeName}}JaxbWrapper >();
                for ({{#if jaxb_package_name}}{{jaxb_package_name}}.{{/if}}{{capFirst @key}} jaxbItem : getJaxb().get{{capFirst @key}}()) {
                    {{@key}}.add(new {{complexTypeName}}JaxbWrapper(jaxbItem));
                }
                return {{@key}};
{{~else}}
                return new {{complexTypeName}}JaxbWrapper(getJaxb().get{{capFirst @key}}());
{{~/if ~}}{{!-- maxOccurs --}}
{{~else}}
{{~#if choiceType}}
{{~#each alternatives}}
               {{#unless @first}} } else{{/unless}} if (getJaxb().get{{capFirst @key}}() != null) {
{{~#if complexType}}
                    return new {{complexTypeName}}JaxbWrapper(getJaxb().get{{capFirst @key}}());
{{~else}}
                    return getJaxb().get{{capFirst @key}}();
{{~/if ~}}{{!-- complexType in choiceType--}}
{{~/each}}{{!-- this: fields in choice type --}}
                } else {
                    throw new NoAlternativeForChoiceException("{{choiceTypeName}}");
                }
{{~else}}
                return getJaxb().get{{capFirst @key}}();
{{~/if ~}}{{!-- choiceType --}}
{{~/if ~}}{{!-- complexType --}}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy