當前位置: 首頁>>代碼示例>>Java>>正文


Java QueryDslPredicateExecutor類代碼示例

本文整理匯總了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();
}
 
開發者ID:Evolveum,項目名稱:gizmo-v3,代碼行數:23,代碼來源:BasicDataProvider.java

示例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;

  }
 
開發者ID:saturnism,項目名稱:spring-data-spanner,代碼行數:10,代碼來源:SpannerRepositoryFactory.java

示例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);
}
 
開發者ID:Evolveum,項目名稱:gizmo-v3,代碼行數:11,代碼來源:BasicDataProvider.java

示例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);
}
 
開發者ID:MinBZK,項目名稱:OperatieBRP,代碼行數:7,代碼來源:CustomJpaRepositoryFactory.java

示例5: isQueryDslExecutor

import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
private boolean isQueryDslExecutor(Class<?> repositoryInterface) {
    return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
 
開發者ID:hatunet,項目名稱:spring-data-mybatis,代碼行數:4,代碼來源:MybatisRepositoryFactory.java

示例6: isQueryDslRepository

import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
private static boolean isQueryDslRepository(Class<?> repositoryInterface) {
	return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
 
開發者ID:yiduwangkai,項目名稱:dubbox-solr,代碼行數:4,代碼來源:SolrRepositoryFactory.java

示例7: isQueryDslExecutor

import org.springframework.data.querydsl.QueryDslPredicateExecutor; //導入依賴的package包/類
private boolean isQueryDslExecutor(Class<?> repositoryInterface) {
  return QUERY_DSL_PRESENT
      && QuerydslPredicateExecutor.class.isAssignableFrom(repositoryInterface);
}
 
開發者ID:Cosium,項目名稱:spring-data-jpa-entity-graph,代碼行數:5,代碼來源:EntityGraphJpaRepositoryFactory.java

示例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);
}
 
開發者ID:extion,項目名稱:base-framework,代碼行數:12,代碼來源:BasicJpaRepositoryFactory.java

示例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);
}
 
開發者ID:antoniomaria,項目名稱:gazpachoquest,代碼行數:11,代碼來源:DefaultRepositoryFactory.java

示例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);
}
 
開發者ID:spring-projects,項目名稱:spring-data-keyvalue,代碼行數:10,代碼來源:KeyValueRepositoryFactory.java


注:本文中的org.springframework.data.querydsl.QueryDslPredicateExecutor類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。