vm.maven.service.vm Maven / Gradle / Ivy
package $!packageName;
import java.io.Serializable;
import java.util.Collection;
import $!{viewPdmXml.packageCode}.dao.$!{tablePdmXml.className}Dao;
import $!{viewPdmXml.packageCode}.model.$!tablePdmXml.className;
import com.dev.devPlatform.core.common.QueryObject;
import com.dev.devPlatform.core.service.BaseService;
#set($startsWord = $!tablePdmXml.className.substring(0,1).toLowerCase())
#set($otherWords = $!tablePdmXml.className.substring(1))
#foreach($columnPdmXml in $tablePdmXml.columnPdmXmlList)
#if($columnPdmXml.isPK)
#set($pkCode = $!columnPdmXml.code)
#end
#end
/**
* Title:
*
* Description:
*
* Copyright: Copyright (c) $!nowYear
*
* Company:
*
* @author $!userName
* @version 1.0
*/
public interface $!className extends BaseService {
//region 基础方法
/**
* 注入DAO
*/
public void set$!{tablePdmXml.className}Dao($!{tablePdmXml.className}Dao $startsWord${otherWords}Dao);
/**
* 用PK查找对象
*/
public $!{tablePdmXml.className} query$!{tablePdmXml.className}(Serializable id) throws Exception ;
/**
* 用Unique Key查找对象
*/
public $!{tablePdmXml.className} query$!{tablePdmXml.className}ByUK(String ukField, Object ukValue) throws Exception ;
/**
* 新增对象
* @param
*/
public void create$!{tablePdmXml.className}($!{tablePdmXml.className} $startsWord$otherWords) throws Exception ;
/**
* 更新对象
* @param
*/
public void update$!{tablePdmXml.className}($!{tablePdmXml.className} $startsWord$otherWords) throws Exception;
/**
* 删除对象
* @param clazz model class to lookup
* @param $!pkCode the identifier (primary key) of the class
*/
public void remove$!{tablePdmXml.className}(Serializable $!pkCode) throws Exception ;
/**
* 批删除对象
* @param $!pkCode the identifier (primary key) of the class
*/
public void remove$!{tablePdmXml.className}s(Serializable[] $!pkCode) throws Exception ;
/**
* @param fieldName 字段名
* @param fieldValue 字段值,这里必须传入字段相应的类型,如Long不能用String
*/
public void remove$!{tablePdmXml.className}ByField(String fieldName, Object fieldValue) throws Exception ;
/**
* 获取所有对象
* @return 返回全部表对象
* @throws Exception
*/
public Collection<$!{tablePdmXml.className}> queryAll$!{tablePdmXml.className}() throws Exception ;
/**
* 根据特定字段获取特定对象列表
* @param fieldName 字段名
* @param fieldValue 字段值,这里必须传入字段相应的类型,如Long不能用String
*/
public Collection<$!{tablePdmXml.className}> query$!{tablePdmXml.className}ByField(String fieldName, Object fieldValue) throws Exception ;
/**
* 计算记录数
* @param fieldName 字段名
* @param fieldValue 字段值,这里必须传入字段相应的类型,如Long不能用String
* @return
*/
public int count$!{tablePdmXml.className}ByField(String fieldName, Object fieldValue) throws Exception ;
/**
* 分页动态查询
* @param queryObject
* @return
*/
public QueryObject query$!{tablePdmXml.className}(QueryObject queryObject) throws Exception ;
//endregion
}