final Condition getWhere() { if (condition == null) { return trueCondition(); } return condition; }
@Override public Condition visit(TrueQueryCriteria criteria, Boolean inArray) { return DSL.trueCondition(); }
/** * Find all records of the underlying table asynchronously. * @param resultHandler the resultHandler which succeeds when the blocking method of this type succeeds or fails * with an <code>DataAccessException</code> if the blocking method of this type throws an exception * @see #findAll() */ default void findAllAsync(Handler<AsyncResult<List<P>>> resultHandler){ fetchAsync(DSL.trueCondition(),resultHandler); }
protected Condition inHostList(List<String> hostUUIDs) { if (hostUUIDs == null || hostUUIDs.isEmpty()) { return DSL.trueCondition(); } return HOST.UUID.in(hostUUIDs); }
/** * Find all records of the underlying table asynchronously. * @return CompletableFuture which succeeds when the blocking method of this type succeeds or fails * with an <code>DataAccessException</code> if the blocking method of this type throws an exception * @see #findAll() */ default CompletableFuture<List<P>> findAllAsync(){ return fetchAsync(DSL.trueCondition()); }
/** * Find all records of the underlying table asynchronously. * * @return Single which succeeds when the blocking method of this type succeeds or fails * with an <code>DataAccessException</code> if the blocking method of this type throws an exception * @see #findAll() */ default Single<List<P>> findAllAsync() { return fetchAsync(DSL.trueCondition()); }
/** * Find all records of the underlying table asynchronously. * @return CompletableFuture which succeeds when the blocking method of this type succeeds or fails * with an <code>DataAccessException</code> if the blocking method of this type throws an exception * @see #findAll() */ default CompletableFuture<List<P>> findAllAsync(){ return fetchAsync(DSL.trueCondition()); }
@Override public FIND_MANY findAll() { return findManyByCondition(DSL.trueCondition()); }
@Override public <R extends Record> Result<R> fetch(Table<R> table) { return fetch(table, trueCondition()); }
@Override public <R extends Record> Cursor<R> fetchLazy(Table<R> table) { return fetchLazy(table, trueCondition()); }
/** * Find all records of the underlying table asynchronously. * @param resultHandler the resultHandler which succeeds when the blocking method of this type succeeds or fails * with an <code>DataAccessException</code> if the blocking method of this type throws an exception * @see #findAll() */ default void findAllAsync(Handler<AsyncResult<List<P>>> resultHandler){ fetchAsync(DSL.trueCondition(),resultHandler); }
@Override public FIND_MANY findAll() { return findManyByCondition(DSL.trueCondition()); }
/** * Find all records of the underlying table asynchronously. * * @return Single which succeeds when the blocking method of this type succeeds or fails * with an <code>DataAccessException</code> if the blocking method of this type throws an exception * @see #findAll() */ default Single<List<P>> findAllAsync() { return fetchAsync(DSL.trueCondition()); }
@Override public int fetchCount(Table<?> table) { return fetchCount(table, trueCondition()); }
@Override public final Condition notIn(T... values) { if (values == null || values.length == 0) { return trueCondition(); } else { return notIn(Utils.fields(values, this).toArray(new Field<?>[0])); } }
@Override public int count(Stream<Condition> conditions) { Condition c = conditions.reduce((acc, item) -> acc.and(item)).orElse(DSL.trueCondition()); return getDSLContext().fetchCount(table, c); }
protected Condition runAfterCondition(String resourceType) { if (resourceType == null) { return PROCESS_INSTANCE.RUN_AFTER.isNull() .or(PROCESS_INSTANCE.RUN_AFTER.le(new Date())); } return DSL.trueCondition(); }
@Override public List<T> fetch(Stream<Condition> conditions, SortField<?>... sorts) { Condition c = conditions.reduce((acc, item) -> acc.and(item)).orElse(DSL.trueCondition()); SelectSeekStepN<Record> step = getDSLContext().select().from(table).where(c).orderBy(sorts); return step.fetchInto(entityClass); }
@Override public PageResult<T> fetch(PageResult<T> page, Stream<Condition> conditions, SortField<?>... sorts) { Condition c = conditions.reduce((acc, item) -> acc.and(item)).orElse(DSL.trueCondition()); return fetch(page, e -> { return e.select(table.fields()).from(table).where(c).orderBy(sorts); }, entityClass); }
@Override public List<? extends Credential> getApiKeys(Account account, String kind, boolean active) { if (kind == null) { kind = CredentialConstants.KIND_API_KEY; } Condition stateCondition = DSL.trueCondition(); if ( active ) { stateCondition = CREDENTIAL.STATE.eq(CommonStatesConstants.ACTIVE); } return create().selectFrom(CREDENTIAL) .where(CREDENTIAL.ACCOUNT_ID.eq(account.getId()) .and(CREDENTIAL.REMOVED.isNull()) .and(stateCondition) .and(CREDENTIAL.KIND.eq(kind))) .fetch(); }