
template.gen.pojo.enjoy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sorm Show documentation
Show all versions of sorm Show documentation
java jpa tool for spring
The newest version!
package #(package);
#(imports)
/*
* #(comment)
* generated by enjoy #now("yyyy-MM-dd")
*/
@Entity
@Table(name = "#(tableName)")
#if(comment)
@Comment(#("\""+comment+"\""))
#end
public class #(className) extends #(DBObjectClassPath) {
#for( attr: attrs)
#replaceSpace()
#if(attr.comment??)
//#(attr.comment)
@Comment(#("\""+attr.comment+"\""))
#end
#if(attr.pk)
@Id
#if(attr.desc.isAutoincrement()??||attr.desc.isGeneratedcolumn()??)
@GeneratedValue
#end
#end
#if(attr.lob)
@Lob
#end
@Column(name = #("\""+attr.columnName+"\"") #if(attr.nullable!=null && !attr.nullable),nullable=#(attr.nullable)#end #if(attr.type=="String" && attr.desc.columnSize < 10000),length = #(attr.desc.columnSize)#end #if(attr.bigNumber),precision=#(attr.desc.columnSize),scale=#(attr.desc.decimalDigit)#end)
#if(attr.temporal)
#(attr.temporal)
#end
private #(attr.type) #(attr.name) ;
#end
#end
public #(className)() {
}
public enum Field implements #(DBFieldClassPath){
#(fieldEnums)
}
#for( attr: attrs)
#if(attr.comment)
/**#(attr.comment)
*@return
*/
#end
public #(attr.type) get#(attr.methodName)(){
return #(attr.name);
}
#if(attr.comment)
/**#(attr.comment)
*@param #(attr.name)
*/
#end
public void set#(attr.methodName)(#(attr.type) #(attr.name) ){
this.#(attr.name) = #(attr.name);
}
#end
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy