Search in sources :

Example 1 with H2SQLEntityStoreAssembler

use of org.qi4j.entitystore.sql.assembly.H2SQLEntityStoreAssembler in project qi4j-sdk by Qi4j.

the class H2SQLEntityStoreTest method assemble.

@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
    // END SNIPPET: assembly
    super.assemble(module);
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    new OrgJsonValueSerializationAssembler().assemble(module);
    // START SNIPPET: assembly
    // DataSourceService
    new DBCPDataSourceServiceAssembler().identifiedBy("h2-datasource-service").visibleIn(Visibility.module).withConfig(config, Visibility.layer).assemble(module);
    // DataSource
    new DataSourceAssembler().withDataSourceServiceIdentity("h2-datasource-service").identifiedBy("h2-datasource").visibleIn(Visibility.module).withCircuitBreaker().assemble(module);
    // SQL EntityStore
    new H2SQLEntityStoreAssembler().visibleIn(Visibility.application).withConfig(config, Visibility.layer).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) H2SQLEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.H2SQLEntityStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Aggregations

ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)1 H2SQLEntityStoreAssembler (org.qi4j.entitystore.sql.assembly.H2SQLEntityStoreAssembler)1 DataSourceAssembler (org.qi4j.library.sql.assembly.DataSourceAssembler)1 DBCPDataSourceServiceAssembler (org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler)1 EntityTestAssembler (org.qi4j.test.EntityTestAssembler)1 OrgJsonValueSerializationAssembler (org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)1