Java 类org.springframework.data.jpa.repository.support.QueryDslJpaRepository 实例源码

项目:base-framework    文件:BasicJpaRepositoryFactory.java   
@Override
protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {
    if (isQueryDslExecutor(metadata.getRepositoryInterface())) {
        return QueryDslJpaRepository.class;
    } else {
        return JpaSupportRepository.class;
    }
}
项目:gazpachoquest    文件:DefaultRepositoryFactory.java   
@Override
protected Class<?> getRepositoryBaseClass(final RepositoryMetadata metadata) {

    if (isQueryDslExecutor(metadata.getRepositoryInterface())) {
        return QueryDslJpaRepository.class;
    } else {
        return GenericRepositoryImpl.class;
    }
}
项目:gazpachoquest    文件:DefaultRepositoryFactory.java   
@Override
@SuppressWarnings({ "unchecked", "rawtypes" })
protected <T, ID extends Serializable> SimpleJpaRepository<?, ?> getTargetRepository(
        final RepositoryMetadata metadata, final EntityManager entityManager) {

    Class<?> repositoryInterface = metadata.getRepositoryInterface();

    JpaEntityInformation<?, Serializable> entityInformation = getEntityInformation(metadata.getDomainType());

    if (isQueryDslExecutor(repositoryInterface)) {
        return new QueryDslJpaRepository(entityInformation, entityManager);
    } else {
        return new GenericRepositoryImpl(entityInformation, entityManager, namedQueryUtil); // custom
    }
}