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

template.PojoConstructors.ftl Maven / Gradle / Ivy


<#if pojo.needsMinimalConstructor()>	<#-- /** minimal constructor */ -->
    def this(${exporter.asParameterList(pojo.getPropertyClosureForMinimalConstructor(), jdk5, pojo)}) {
<#if pojo.isSubclass() && !pojo.getPropertyClosureForSuperclassMinimalConstructor().isEmpty()>
        super(${c2j.asArgumentList(pojo.getPropertyClosureForSuperclassMinimalConstructor())});        

        this()
<#foreach field in pojo.getPropertiesForMinimalConstructor()>
        this.${field.name} = ${field.name}

    }
    
<#if pojo.needsFullConstructor()>
<#-- /** full constructor */ -->
    def this(${exporter.asParameterList(pojo.getPropertyClosureForFullConstructor(), jdk5, pojo)}) {
<#if pojo.isSubclass() && !pojo.getPropertyClosureForSuperclassFullConstructor().isEmpty()>
        super(${c2j.asArgumentList(pojo.getPropertyClosureForSuperclassFullConstructor())});        

       this()
<#foreach field in pojo.getPropertiesForFullConstructor()>
       this.${field.name} = ${field.name}

    }
    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy