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

META-INF.vo_entity.ftl Maven / Gradle / Ivy

Go to download

The mvc-generator makes it easier to write code with spring-mvc applications. mvc-generator generate code with freemarker template of controller, service and dao etc level object using maven plugin. Simplicity is the biggest advantage of the generator code over generating code tools.

There is a newer version: 1.0.4.1
Show newest version
package ${entity.javaPackage};

import ${entity.commonPackage}.domain.${entity.base?cap_first};

/**
* This code is generated by bianwentao
* @author bianwentao
*
*/
public class ${entity.base?cap_first}VO {
    /********** attribute ***********/
<#list entity.properties as property>
    private ${property.javaType} ${entity.base}${property.propertyName?cap_first};


    /********** constructors ***********/
<#if entity.constructors>
    public ${entity.className}() {

    }

    public ${entity.className}(<#list entity.properties as property>${property.javaType} ${property.propertyName}<#if property_has_next>, ) {
    <#list entity.properties as property>
        this.${entity.base}${property.propertyName?cap_first} = ${property.propertyName};
    
    }
    public ${entity.className}(<#list entity.properties as property><#if property.propertyName !="id">${property.javaType} ${property.propertyName}<#if property_has_next>, ) {
        <#list entity.properties as property><#if property.propertyName !="id">
        this.${entity.base}${property.propertyName?cap_first} = ${property.propertyName};
        
    }


    /********** get/set ***********/
<#list entity.properties as property>
    public ${property.javaType} get${entity.base?cap_first}${property.propertyName?cap_first}() {
        return ${entity.base}${property.propertyName?cap_first};
    }

    public void set${entity.base?cap_first}${property.propertyName?cap_first}(${property.javaType} ${property.propertyName}) {
        this.${entity.base}${property.propertyName?cap_first} = ${property.propertyName};
    }




    public ${entity.base?cap_first} toSource() {
    ${entity.base?cap_first} ${entity.base} = new ${entity.base?cap_first}();
        <#list entity.properties as property>
        ${entity.base}.set${property.propertyName?cap_first}(${entity.base}${property.propertyName?cap_first});
        
    return ${entity.base};
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy