org.hswebframework.ezorm.core.dsl.Query.setSingleExecutor()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中org.hswebframework.ezorm.core.dsl.Query.setSingleExecutor方法的一些代码示例,展示了Query.setSingleExecutor的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setSingleExecutor方法的具体详情如下:
包路径:org.hswebframework.ezorm.core.dsl.Query
类名称:Query
方法名:setSingleExecutor

Query.setSingleExecutor介绍

暂无

代码示例

代码示例来源:origin: hs-web/hsweb-framework

/**
 * 创建本服务的dsl查询操作对象
 * 可通过返回的Query对象进行dsl方式操作如:<br>
 * <code>
 * createQuery().where("id",1).single();
 * </code>
 *
 * @return {@link Query}
 * @see Query
 * @see org.hswebframework.ezorm.core.Conditional
 * @since 3.0
 */
default Query<E, QueryParamEntity> createQuery() {
  Query<E, QueryParamEntity> query = Query.empty(new QueryParamEntity());
  query.setListExecutor(this::select);
  query.setTotalExecutor(this::count);
  query.setSingleExecutor(this::selectSingle);
  query.noPaging();
  return query;
}

代码示例来源:origin: hs-web/hsweb-framework

query.setListExecutor(dao::query);
query.setTotalExecutor(dao::count);
query.setSingleExecutor((param) -> {
  param.doPaging(0, 1);
  List<PO> list = dao.query(param);

代码示例来源:origin: hs-web/hsweb-easy-orm

public static <R, P extends QueryParam> Query<R, P> forSingle(SingleExecutor<R, P> executor, P param) {
  return new Query<R, P>(param).setSingleExecutor(executor);
}

代码示例来源:origin: org.hswebframework.web/hsweb-commons-service-simple

/**
 * 创建本服务的dsl查询操作对象
 * 可通过返回的Query对象进行dsl方式操作如:<br>
 * <code>
 * createQuery().where("id",1).single();
 * </code>
 *
 * @return {@link Query}
 * @see Query
 * @see org.hswebframework.ezorm.core.Conditional
 * @since 3.0
 */
default Query<E, QueryParamEntity> createQuery() {
  Query<E, QueryParamEntity> query = Query.empty(new QueryParamEntity());
  query.setListExecutor(this::select);
  query.setTotalExecutor(this::count);
  query.setSingleExecutor(this::selectSingle);
  query.noPaging();
  return query;
}

代码示例来源:origin: org.hswebframework.web/hsweb-commons-service-simple

query.setListExecutor(dao::query);
query.setTotalExecutor(dao::count);
query.setSingleExecutor((param) -> {
  param.doPaging(0, 1);
  List<PO> list = dao.query(param);

相关文章