/** * 创建一个空的查询参数实体,该实体无任何参数. * * @return 无条件的参数实体 */ public static QueryParamEntity empty() { return new QueryParamEntity(); }
/** * @since 3.0.4 */ public static <T> Query<T, QueryParamEntity> newQuery() { return Query.empty(new QueryParamEntity()); }
@Override @SuppressWarnings("unchecked") public List<OAuth2Client> getAll() { QueryParamEntity entity = new QueryParamEntity(); entity.setPaging(false); return (List) oAuth2ClientDao.query(entity); } }
public DefaultLinkedRelations(ServiceContext serviceContext, Supplier<List<String>> targetIdSupplier) { this.serviceContext = serviceContext; this.targetIdSupplier = targetIdSupplier; query = Query.<PersonEntity, QueryParamEntity>empty(new QueryParamEntity()).nest(); }
Query<PO, QueryParamEntity> query = new Query<>(new QueryParamEntity()); query.setListExecutor(dao::query); query.setTotalExecutor(dao::count);
/** * 创建本服务的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; }
@Override @SuppressWarnings("unchecked") public List<OAuth2Client> getAll() { QueryParamEntity entity = new QueryParamEntity(); entity.setPaging(false); return (List) oAuth2ClientDao.query(entity); } }
Query<PO, QueryParamEntity> query = new Query<>(new QueryParamEntity()); query.setListExecutor(dao::query); query.setTotalExecutor(dao::count);
/** * 创建本服务的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; }