
net.cassite.daf4j.ds.AroundParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of daf4j-api Show documentation
Show all versions of daf4j-api Show documentation
A library provides facade api for data accessing.
The newest version!
package net.cassite.daf4j.ds;
import net.cassite.daf4j.QueryParameter;
import net.cassite.daf4j.QueryParameterWithFocus;
import net.cassite.daf4j.UpdateEntry;
import net.cassite.daf4j.Where;
import java.util.List;
import java.util.Map;
/**
* Where子句的解释器
*
* @param 上下文
* @param 基本元素
*/
public interface AroundParser extends AdvancedParser {
/**
* 执行find功能
*
* @param source 数据源
* @param entityClass 要查找的类型
* @param pkValue 标识值
* @param 实体类型
* @return 查找到则返回该值, 否则返回null
* @throws Exception 可能的异常
*/
En find(DS source, Class entityClass, Object pkValue) throws Exception;
/**
* 执行list方法时首先调用此方法获取上下文
*
* @param source 数据源
* @param entity 查询来源
* @param where 查询条件
* @param parameter 查询参数
* @return 上下文
* @throws Exception 可能的异常
*/
Context initiateList(DS source, Object entity, Where where, QueryParameter parameter) throws Exception;
/**
* list方法开始解释前调用
*
* @param context 上下文
* @return 上下文
* @throws Exception 可能的异常
*/
Context beforeParsingList(Context context) throws Exception;
/**
* list方法解释完成后,执行开始前调用
*
* @param context 上下文
* @return 上下文
* @throws Exception 可能的异常
*/
Context afterParsingList(Context context) throws Exception;
/**
* list方法执行
*
* @param context 上下文
* @return 取到的List值
* @throws Exception 可能的异常
*/
List> executeList(Context context) throws Exception;
/**
* 执行projection方法时首先调用此方法获取上下文
*
* @param source 数据源
* @param entity 查询来源
* @param where 查询条件
* @param parameter 查询参数
* @return 上下文
* @throws Exception 可能的异常
*/
Context initiateProjection(DS source, Object entity, Where where, QueryParameterWithFocus parameter) throws Exception;
/**
* projection解析开始前调用
*
* @param context 上下文
* @return 上下文
* @throws Exception 可能的异常
*/
Context beforeParsingProjection(Context context) throws Exception;
/**
* projection解析完成后,执行开始前调用
*
* @param context 上下文
* @return 上下文
* @throws Exception 可能的异常
*/
Context afterParsingProjection(Context context) throws Exception;
/**
* 执行projection
*
* @param context 上下文
* @return List[Map]结果
* @throws Exception 可能的异常
*/
List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy