Search in sources :

Example 1 with NamingStrategy

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

the class SqlGeneratorUnitTests method setUp.

@Before
public void setUp() {
    NamingStrategy namingStrategy = new PrefixingNamingStrategy();
    JdbcMappingContext context = new JdbcMappingContext(namingStrategy, mock(NamedParameterJdbcOperations.class), __ -> {
    });
    JdbcPersistentEntity<?> persistentEntity = context.getRequiredPersistentEntity(DummyEntity.class);
    this.sqlGenerator = new SqlGenerator(context, persistentEntity, new SqlGeneratorSource(context));
}
Also used : NamingStrategy(org.springframework.data.jdbc.mapping.model.NamingStrategy) JdbcMappingContext(org.springframework.data.jdbc.mapping.model.JdbcMappingContext) NamedParameterJdbcOperations(org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 JdbcMappingContext (org.springframework.data.jdbc.mapping.model.JdbcMappingContext)1 NamingStrategy (org.springframework.data.jdbc.mapping.model.NamingStrategy)1 NamedParameterJdbcOperations (org.springframework.jdbc.core.namedparam.NamedParameterJdbcOperations)1