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

templates0.Domain.tmpl Maven / Gradle / Ivy

Go to download

Assist in generating CRUD code, without limitation on the specific language, as long as you can write velocity templates.

There is a newer version: 1.0.8
Show newest version

package ${packagePrefix}.entity;

import java.io.Serializable;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;



 /**
 *
 * @ClassName ${className}
 * @Description
 * @author ${author}
 * @version V1.0
 * @since V1.0
 * @date ${date}
 *
 */

@Document(collection="${tableName}")
public  class ${className}    {

    @Id
	private ${keyType}  ${keyVar} ;

    #foreach($prop in $columnResult)
    // "$prop.comments"
    private ${prop.dataType}  ${prop.javaName} ;
    #end


	 #foreach($prop in $pkResult)
     	// "$prop.comments"
     public ${prop.dataType}  ${prop.getterMethod}  () {
         return this.${prop.javaName};
     }
	 #end

    #foreach($prop in $columnResult)

    public ${prop.dataType}  ${prop.getterMethod}  () {
		return ${prop.javaName};
	}
	#end

    #foreach($prop in $pkResult)
     public void ${prop.setterMethod} (${prop.dataType}  ${prop.javaName}) {
         this.${prop.javaName} = ${prop.javaName};
     }
	 #end

    #foreach($prop in $columnResult)
    public void ${prop.setterMethod} (${prop.dataType}  ${prop.javaName}) {
        this.${prop.javaName} = ${prop.javaName};
     }
	#end



}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy