BaseDAO

/**
*
*/
package com.huawei.cloud.util.baseDAO;

import java.io.Serializable;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.springframework.dao.DataAccessException;

/**
* @author mickey
*
*/
public interface IBaseDAO<T, ID extends Serializable> {

public T findObject(Integer objectId) throws DataAccessException,SQLException;

public abstract void saveOrUpdateObject(T t) throws DataAccessException,SQLException;

public abstract void saveObject(T t) throws DataAccessException,SQLException;

public abstract void updateObject(T t) throws DataAccessException,SQLException;

public abstract T getObject(String objectId) throws DataAccessException,SQLException;

public abstract T loadObject(String objectId) throws DataAccessException,SQLException;

public abstract T loadObject(Integer objectId) throws DataAccessException,SQLException;

public abstract T findByObjectId(String objectId)throws DataAccessException, SQLException;

public abstract List<T> findAll(String querySql)throws DataAccessException, SQLException;

public abstract void deleteObject(T t) throws DataAccessException,SQLException;

public abstract List<T> findObject(String querySql)throws DataAccessException, SQLException;

public abstract List<T> findObject(String querySql, Object value)throws DataAccessException, SQLException;

public abstract List<T> findObject(String querySql, Object[] values)throws DataAccessException, SQLException;

public abstract List<T> findObjectByLimit(Map<String, String> condition,int firstResult, int maxResult) throws DataAccessException,SQLException;

public List<T> findObjectByLimit(Map<String, String> condition,final int firstResult,final int maxResult,Map<String, String> orderByMap) throws DataAccessException,SQLException;
}

你可能感兴趣的:(baseDao)