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

dict.jeddict.6.4.0.source-code.classtemplate.ftl Maven / Gradle / Ivy

Go to download

Jeddict is an open source Jakarta EE application development platform that accelerates developers productivity and simplifies development tasks of creating complex entity relationship models.

There is a newer version: 6.6.0
Show newest version
<#-- Package Name definition -->
<#if classDef.getPackageName()?has_content>
package ${classDef.getPackageName()};

<#-- import statements -->
import java.io.Serializable;
<#foreach importStatement in classDef.getImportSnippets()![]>
${importStatement}

<#-- java doc -->
<#if classDef.isJavaDocExist()>
${classDef.getJavaDoc()}

<#if classDef.getManagedType()?has_content>
${classDef.getManagedType()}

public class ${classDef.getClassName()} implements Serializable {
<#-- member variables -->
<#foreach varDef in classDef.getVariableDefs()![]>
<#-- $varDef.type => $varDef.getTypeIdentifier().getVariableType() ## to resolve problem Collection => Collection -->
    private ${varDef.type} ${varDef.name};

<#foreach constructor in classDef.getConstructors()![]>
    ${constructor.getSnippet()}

<#-- getter/setter -->
<#foreach varDef in classDef.getVariableDefs()![]>
<#assign method = varDef.getMethodName()>

<#assign methodPrefix = varDef.getGetterMethodPrefix()>
   public ${varDef.type} ${methodPrefix}${method}() {
        return ${varDef.name};
    }

<#assign methodPrefix = varDef.getSetterMethodPrefix()>
    public void ${methodPrefix}${method} (${varDef.type} ${varDef.name}) {
        this.${varDef.name} = ${varDef.name};
    }

    @Override
    public boolean equals(Object obj) {
        ${classDef.getEqualsMethod().getSnippet()}
    }

    @Override
    public int hashCode() {
        ${classDef.getHashcodeMethod().getSnippet()}
    }

    @Override
    public String toString() {
        return ${classDef.getToStringMethod().getSnippet()};
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy