ibasedao.java
来自「一个很好的开源项目管理系统源代码」· Java 代码 · 共 121 行
JAVA
121 行
package net.java.workeffort.service.dao;import java.util.List;import java.util.Map;import javax.sql.DataSource;import net.java.workeffort.service.domain.PageResult;import net.java.workeffort.service.support.OptimisticLockingException;/** * The base dao interface. * @author Antony Joseph */public interface IBaseDao { /** * @param statementName The statement name * @param obj The query parameter * @return The List of rows */ List queryForList(String statementName, Object obj); /** * @param statementName The statement name * @param obj The query parameter * @param skipResults The results to skip * @param maxResults The number of rows to return * @return The List of rows */ List queryForList(String statementName, Object obj, int skipResults, int maxResults); /** * Returns the results loaded into a map keyed by the parameter passed in as * keyProperty * @param statementName The statement name * @param obj The query parameter * @param keyProperty The property which will be used as key into the map * @return The map */ Map queryForMap(String statementName, Object obj, String keyProperty); /** * Returns the results loaded into a map keyed by the parameter passed in as * keyProperty. The property value will be valueProperty. * @param statementName The statement name * @param obj The query parameter * @param keyProperty The property which will be used as key into the map * @param valueProperty The value * @return The map */ Map queryForMap(String statementName, Object obj, String keyProperty, String valueProperty); /** * @param statementName The statement name * @param obj The query parameter * @return The Object */ Object queryForObject(String statementName, Object obj); /** * @param statementName The statement name * @param obj The object */ void update(String statementName, Object obj) throws OptimisticLockingException; /** * @param statementName The statement name * @param obj The object * @param modificationDetails Whether lastModificationTs and * lastModificationBy needs to be set */ void update(String statementName, Object obj, boolean modificationDetails) throws OptimisticLockingException; /** * @param statementName The statement name * @param obj The object */ void insert(String statementName, Object obj); /** * @param statementName The statement name * @param obj The object * @param createdDetails Whether createdTs and createdBy needs to be set */ void insert(String statementName, Object obj, boolean createdDetails); /** * @param statementName The statement name * @param obj The object * @param createdDetails Whether createdTs and createdBy needs to be set * @param modificationDetails Whether lastModificationTs and * lastModificationBy needs to be set */ void insert(String statementName, Object obj, boolean createdDetails, boolean modificationDetails); /** * @param statementName The statement name * @param obj The object */ void delete(String statementName, Object obj) throws OptimisticLockingException; PageResult getPageResult(String statementName, Object obj); void processRows(Object obj, String propertyName, IRowCallback rowCallback); String getDatabase(); void setDatabase(String database); }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?