package com.hzya.frame.basedao.service;


import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.hzya.frame.page.PageAttribute;
import com.hzya.frame.web.entity.JsonResultEntity;

import java.io.Serializable;
import java.util.List;

public interface IBaseService<E extends Serializable, PK extends Serializable> {
	E get(PK paramPK);

	int removeById(PK paramPK) throws Exception;

	int logicRemove(E e) throws Exception;

	int logicRemoveMultiCondition(E paramE) throws Exception;

	E saveOrUpdate(E paramE) throws Exception;

	E save(E paramE) throws Exception;

	E update(E paramE) throws Exception;

	E queryOne(E paramE);

	List<E> getAll();

	List<E> query(E paramE);

	List<E> queryByLike(E paramE);

	List<E> queryByOr(E paramE);

	PageAttribute<E> queryPaged(String paramString, E paramE);

    PageAttribute<E> queryPaged(E paramE);

	boolean checkRepeated(E paramE);

	//***************前端分页*************
	JsonResultEntity queryPagedJson(JSONObject jsonObject);
	//***************前端list*************
	JsonResultEntity queryListJson(JSONObject jsonObject);
	//***************前端保存*************
	JsonResultEntity saveJson(JSONObject jsonObject);
	//***************前端修改*************
	JsonResultEntity updateJson(JSONObject jsonObject);
	//***************前端删除*************
	JsonResultEntity deleteJson(JSONObject jsonObject);

}
