
com.tmsps.ne4springboot.base.IBaseService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ne4SpringBoot Show documentation
Show all versions of ne4SpringBoot Show documentation
NE For SpringBoot is good :)
package com.tmsps.ne4springboot.base;
import java.util.List;
import java.util.Map;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import com.tmsps.ne4springboot.orm.model.DataModel;
import com.tmsps.ne4springboot.orm.param.NeParamList;
import com.tmsps.ne4springboot.orm.page.Page;
/**
*======================================================
* @author zhangwei [email protected]
*------------------------------------------------------
* IBaseService base service interface
*======================================================
*/
public interface IBaseService {
//获取对象JdbcTemplate,便于使用JdbcTemplate提供的封装方法
public JdbcTemplate getJdbcTemplate();
//获取NamedParameterJdbcTemplate
public NamedParameterJdbcTemplate getNamedParameterJdbcTemplate();
//与数据库表的信息对应,保存进入数据库,sync 为是否需要同步一次Model,用于数据库中默认属性的回填
public int save(DataModel model);
public DataModel save(DataModel model, boolean sync);
public int saveTemplate(DataModel model);
public DataModel saveTemplate(DataModel model, boolean sync);
//批量保存数据
public void saves(List extends DataModel> datas);
public T findById(Object idVal, final Class extends DataModel> clazz);
public Map findObj(String sql);
public Map findObj(String sql, Object[] vals);
public T findObj(String sql, Class extends DataModel> clazz);
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy