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

pojo.PojoConstructors.ftl Maven / Gradle / Ivy

There is a newer version: 5.6.15.Final
Show newest version

<#--  /** default constructor */ -->
    public ${pojo.getDeclarationName()}() {
    }

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

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

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

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

    }
    




© 2015 - 2024 Weber Informatics LLC | Privacy Policy