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

vm.java.PO.vm Maven / Gradle / Ivy

package ${packageName}.${moduleName}.po;

import javax.persistence.*;
import com.beli.common.pojos.bo.BaseBusinessObject;
import com.beli.common.pojos.po.BasePersistenceObject;
import com.beli.${moduleName}.bo.${ClassName}BO;
import java.util.Date;
import lombok.Data;
#foreach ($import in $importList)
import ${import};
#end

/**
 * ${functionName}
 * 
 * @author ${author}
 * @date ${datetime}
 */
@Table(name = "${tableName}")
@Data
public class ${ClassName}PO extends BasePersistenceObject {

#foreach ($column in $columns)
	/**
	* $column.columnComment
	*/
#if(${column.javaField}=="id")
	@Id
#if(${databaseType}=="oracle")
	@KeySql(sql = "select SEQ_${tableName}.nextval from dual", order = ORDER.BEFORE)
#else
	@GeneratedValue(strategy = GenerationType.IDENTITY)
#end
	private $column.javaType  $column.javaField;
#else
	private $column.javaType $column.javaField;
#end
#end
	@Override
	public BaseBusinessObject toBO() {
		${ClassName}BO bo=new ${ClassName}BO();
    	copyFields(bo);
    	return bo;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy