本文整理匯總了Java中org.springframework.data.querydsl.QueryDslPredicateExecutor類的典型用法代碼示例。如果您正苦於以下問題:Java QueryDslPredicateExecutor類的具體用法?Java QueryDslPredicateExecutor怎麽用?Java QueryDslPredicateExecutor使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
QueryDslPredicateExecutor類屬於org.springframework.data.querydsl包,在下文中一共展示了QueryDslPredicateExecutor類的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: iterator
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
@Override
public Iterator<? extends T> iterator(long first, long count) {
int pageIndex = (int) Math.ceil((double) first / (double) itemsPerPage);
LOG.debug("Setting page request: page {}, size {}", pageIndex, itemsPerPage);
Predicate predicate = getPredicate();
PageRequest page = new PageRequest(pageIndex, itemsPerPage, sort);
Page<T> found;
if (predicate == null) {
found = repository.findAll(page);
} else {
QueryDslPredicateExecutor executor = (QueryDslPredicateExecutor) repository;
found = executor.findAll(predicate, page);
}
if (found != null) {
return found.iterator();
}
return new ArrayList<T>().iterator();
}
示例2: getRepositoryBaseClass
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
@Override
protected Class<?> getRepositoryBaseClass(RepositoryMetadata repositoryMetadata) {
boolean isQueryDslRepository = QUERY_DSL_PRESENT
&& QueryDslPredicateExecutor.class.isAssignableFrom(repositoryMetadata.getRepositoryInterface());
// return isQueryDslRepository ? QueryDslSpannerRepository.class : SimpleSpannerRepository.class;
return SimpleSpannerRepository.class;
}
示例3: size
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
@Override
public long size() {
Predicate predicate = getPredicate();
if (predicate == null) {
return repository.count();
}
QueryDslPredicateExecutor executor = (QueryDslPredicateExecutor) repository;
return executor.count(predicate);
}
示例4: isQueryDslSpecificExecutor
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
/**
* Returns whether the given repository interface requires a QueryDsl specific implementation to be chosen.
*/
private boolean isQueryDslSpecificExecutor(final Class<?> repositoryInterface) {
return QueryDslUtils.QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
示例5: isQueryDslExecutor
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
private boolean isQueryDslExecutor(Class<?> repositoryInterface) {
return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
示例6: isQueryDslRepository
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
private static boolean isQueryDslRepository(Class<?> repositoryInterface) {
return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
示例7: isQueryDslExecutor
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
private boolean isQueryDslExecutor(Class<?> repositoryInterface) {
return QUERY_DSL_PRESENT
&& QuerydslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
示例8: isQueryDslExecutor
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
/**
* Returns whether the given repository interface requires a QueryDsl specific implementation to be chosen.
*
* @param repositoryInterface
*
* @return boolean
*/
private boolean isQueryDslExecutor(Class<?> repositoryInterface) {
return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
示例9: isQueryDslExecutor
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
/**
* Returns whether the given repository interface requires a QueryDsl
* specific implementation to be chosen.
*
* @param repositoryInterface
* @return
*/
private boolean isQueryDslExecutor(final Class<?> repositoryInterface) {
return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
示例10: isQueryDslRepository
import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
/**
* Returns whether the given repository interface requires a QueryDsl specific implementation to be chosen.
*
* @param repositoryInterface must not be {@literal null}.
* @return
*/
private static boolean isQueryDslRepository(Class<?> repositoryInterface) {
return QUERY_DSL_PRESENT && QuerydslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}