1、接口定义
package com.gkhb.mis.core.dao;
import java.util.List;
import java.util.Map;
import org.springframework.jdbc.core.SqlParameter;
/**
* @corporation gkhb
* @author
* @date 2008-4-9 下午03:03:54
* @path com.gkhb.mis.core.dao
* @description
*/
public interface IOperationGenericDao {
public static final String DAO = "operationGenericDao";
public Page findByPage(String sql, Page page, Object... values);
public List<?> findRow(String sql, Object... values);
public Map<?, ?> getRow(String sql, Object... values);
public int saveRow(String sql, Object... values);
public Map<?, ?> executeStroeProcedure(String procedureName,
SqlParameter[] procedureParameters, Object... parameterValues);
}
2、接口实现
package com.gkhb.mis.core.dao;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.core.support.JdbcDaoSupport;
import org.springframework.jdbc.object.StoredProcedure;
/**
* @corporation gkhb
* @author
* @date 2008-4-9 下午03:04:47
* @path com.gkhb.mis.core.dao
* @description 通用业务数据访问处理
*/
public class OperationGenericDaoJdbcImp extends JdbcDaoSupport implements
IOperationGenericDao {
protected final Log LOG = LogFactory.getLog(this.getClass());
/**
* @desc
* @date 2008-11-7
* @author
* @parameter List={map}
* @see com