/** * Creates a new {@link JPQLQuery} count query for the given {@link Predicate}. * * @param predicate, can be {@literal null}. * @return the Querydsl count {@link JPQLQuery}. */ protected JPQLQuery<?> createCountQuery(@Nullable Predicate... predicate) { return doCreateQuery(getQueryHints(), predicate); }
/** * Creates a new {@link JPQLQuery} for the given {@link Predicate}. * * @param predicate * @return the Querydsl {@link JPQLQuery}. */ protected JPQLQuery<?> createQuery(Predicate... predicate) { AbstractJPAQuery<?, ?> query = doCreateQuery(getQueryHints().withFetchGraphs(entityManager), predicate); CrudMethodMetadata metadata = getRepositoryMethodMetadata(); if (metadata == null) { return query; } LockModeType type = metadata.getLockModeType(); return type == null ? query : query.setLockMode(type); }
/** * Creates a new {@link JPQLQuery} count query for the given {@link Predicate}. * * @param predicate, can be {@literal null}. * @return the Querydsl count {@link JPQLQuery}. */ protected JPQLQuery<?> createCountQuery(@Nullable Predicate... predicate) { return doCreateQuery(getQueryHints(), predicate); }
/** * Creates a new {@link JPQLQuery} for the given {@link Predicate}. * * @param predicate * @return the Querydsl {@link JPQLQuery}. */ protected JPQLQuery<?> createQuery(Predicate... predicate) { AbstractJPAQuery<?, ?> query = doCreateQuery(getQueryHints().withFetchGraphs(entityManager), predicate); CrudMethodMetadata metadata = getRepositoryMethodMetadata(); if (metadata == null) { return query; } LockModeType type = metadata.getLockModeType(); return type == null ? query : query.setLockMode(type); }