Search in sources :

Example 6 with FeatureStoreSpringJdbc

use of org.ff4j.springjdbc.store.FeatureStoreSpringJdbc in project ff4j by ff4j.

the class SpringJdbcFeatureStoreTest method initStore.

/**
 * {@inheritDoc}
 */
@Override
protected FeatureStore initStore() {
    builder = new EmbeddedDatabaseBuilder();
    db = // 
    builder.setType(EmbeddedDatabaseType.HSQL).addScript(// 
    "classpath:schema-ddl.sql").addScript(// 
    "classpath:ff-store.sql").build();
    FeatureStoreSpringJdbc jdbcStore = new FeatureStoreSpringJdbc();
    jdbcStore.setDataSource(db);
    jdbcStore.getJdbcTemplate();
    return jdbcStore;
}
Also used : EmbeddedDatabaseBuilder(org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder) FeatureStoreSpringJdbc(org.ff4j.springjdbc.store.FeatureStoreSpringJdbc)

Aggregations

FeatureStoreSpringJdbc (org.ff4j.springjdbc.store.FeatureStoreSpringJdbc)6 EmbeddedDatabaseBuilder (org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder)5 PreparedStatement (java.sql.PreparedStatement)1 PropertyStoreSpringJdbc (org.ff4j.springjdbc.store.PropertyStoreSpringJdbc)1 JdbcQueryBuilder (org.ff4j.store.JdbcQueryBuilder)1 Test (org.junit.Test)1