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

org.sagacity.quickvo.dto-abstract.ftl Maven / Gradle / Ivy

The newest version!
/**
 *@Generated by sagacity-quickvo 5.0
 */
package ${quickVO.voPackage}.${quickVO.abstractPath};

import java.io.Serializable;
<#if (quickVO.apiDoc=="swagger-v2")>
import io.swagger.annotations.ApiModelProperty;

<#if (quickVO.apiDoc=="swagger-v3")>
import io.swagger.v3.oas.annotations.media.Schema;

<#if (quickVO.lombok)>
import lombok.Data;
<#if (quickVO.lombokChain)>
import lombok.experimental.Accessors;


<#if (quickVO.imports?exists && quickVO.imports?size>0)>
<#list quickVO.imports as import>
import ${import};


<#if (quickVO.apiDocImports?exists && quickVO.apiDocImports?size>0)>
<#list quickVO.apiDocImports as import>
import ${import};


<#if (quickVO.voExtends?exists)>
import ${quickVO.voExtends};


/**
<#if (quickVO.projectName?exists)> * @project ${quickVO.projectName}
<#if (quickVO.author?exists)> * @author ${quickVO.author}
<#if (quickVO.version?exists)> * @version ${quickVO.version}
 * <#if (quickVO.tableRemark?exists && quickVO.tableRemark!='')>@description ${quickVO.tableName},${quickVO.tableRemark}  
 */
<#if (quickVO.lombok)>
@Data
<#if (quickVO.lombokChain)>
@Accessors(chain = true)


<#if (quickVO.voExtends?exists)>
public class Abstract${quickVO.voName} extends ${quickVO.voExtends?substring(quickVO.voExtends?last_index_of(".")+1)} implements Serializable {
<#else>
public class Abstract${quickVO.voName} implements Serializable {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = ${quickVO.voAbstractSerialUID}L;
	
<#list quickVO.columns as column>
<#if (column.skipVO==false)>

	<#assign hasRemark=true>
	<#if (quickVO.apiDoc=="swagger-v2")>
	<#assign hasRemark=false>
	@ApiModelProperty(name="${column.colJavaName?uncap_first}",value="${column.colRemark!""}"<#if (column.nullable=='0')>,allowEmptyValue=false<#else>,allowEmptyValue=true)
	
	<#if (quickVO.apiDoc=="swagger-v3")>
	<#assign hasRemark=false>
	@Schema(name="${column.colJavaName?uncap_first}",description="${column.colRemark!""}"<#if (column.nullable=='0')>,nullable=false<#else>,nullable=true)
	
	<#if (column.apiDocContent?exists)>
	<#assign hasRemark=false>
	${column.apiDocContent}
	
	<#if (hasRemark==true)>
	/**
	 * ${column.colRemark!""}
	 */
	
	protected ${column.resultType} ${column.colJavaName?uncap_first};


<#if (quickVO.columnSize==0)>
   // 未能获得表字段信息,请检查quickvo.xml 中dataSource的schema 和 catalog配置,可尝试先去除schema\catalog
   // 内部原理: conn.getMetaData().getColumns(catalog, schema, tableName, null);

<#if (quickVO.lombok==false)>
<#list quickVO.columns as column>
<#if (column.skipVO==false)>
	
	/**
	 *@param ${column.colJavaName?uncap_first} the ${column.colJavaName?uncap_first} to set
	 */
	<#if (quickVO.returnSelf==true)>
	public Abstract${quickVO.voName} set${column.colJavaName?cap_first}(${column.resultType} ${column.colJavaName?uncap_first}) {
		this.${column.colJavaName?uncap_first}=${column.colJavaName?uncap_first};
		return this;
	}
	<#else>
	public void set${column.colJavaName?cap_first}(${column.resultType} ${column.colJavaName?uncap_first}) {
		this.${column.colJavaName?uncap_first}=${column.colJavaName?uncap_first};
	}
	
		
	/**
	 *@return the ${column.colJavaName}
	 */
	public ${column.resultType} get${column.colJavaName?cap_first}() {
	    return this.${column.colJavaName?uncap_first};
	}



}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy