org.springframework.data.jpa.repository.support.QuerydslJpaRepository Java Examples

The following examples show how to use org.springframework.data.jpa.repository.support.QuerydslJpaRepository. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DefaultRepositoryFactory.java    From gazpachoquest with GNU General Public License v3.0 6 votes vote down vote up
@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
    }
}
 
Example #2
Source File: DefaultRepositoryFactory.java    From gazpachoquest with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected Class<?> getRepositoryBaseClass(final RepositoryMetadata metadata) {

    if (isQueryDslExecutor(metadata.getRepositoryInterface())) {
        return QueryDslJpaRepository.class;
    } else {
        return GenericRepositoryImpl.class;
    }
}
 
Example #3
Source File: BasicJpaRepositoryFactory.java    From base-framework with Apache License 2.0 5 votes vote down vote up
@Override
protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {
	if (isQueryDslExecutor(metadata.getRepositoryInterface())) {
		return QueryDslJpaRepository.class;
	} else {
		return JpaSupportRepository.class;
	}
}