Search in sources :

Example 1 with JdbcPersistentEntityInformation

use of org.springframework.data.jdbc.mapping.model.JdbcPersistentEntityInformation in project spring-data-jdbc by spring-projects.

the class JdbcRepositoryFactory method getTargetRepository.

@SuppressWarnings("unchecked")
@Override
protected Object getTargetRepository(RepositoryInformation repositoryInformation) {
    JdbcPersistentEntityInformation persistentEntityInformation = context.getRequiredPersistentEntityInformation(repositoryInformation.getDomainType());
    JdbcEntityTemplate template = new JdbcEntityTemplate(publisher, context, accessStrategy);
    return new SimpleJdbcRepository<>(template, persistentEntityInformation);
}
Also used : JdbcPersistentEntityInformation(org.springframework.data.jdbc.mapping.model.JdbcPersistentEntityInformation) JdbcEntityTemplate(org.springframework.data.jdbc.core.JdbcEntityTemplate) SimpleJdbcRepository(org.springframework.data.jdbc.repository.SimpleJdbcRepository)

Aggregations

JdbcEntityTemplate (org.springframework.data.jdbc.core.JdbcEntityTemplate)1 JdbcPersistentEntityInformation (org.springframework.data.jdbc.mapping.model.JdbcPersistentEntityInformation)1 SimpleJdbcRepository (org.springframework.data.jdbc.repository.SimpleJdbcRepository)1