Search in sources :

Example 26 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class ServiceInstantiationTests method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    module.entities(MyConfigurationEntity.class);
    module.services(MyService.class);
    new EntityTestAssembler().assemble(module);
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 27 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class AssemblyRoleTest method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    new EntityTestAssembler().assemble(module);
    module.transients(FooComposite.class).withTypes(Foo.class);
    module.transients(FooComposite2.class).withTypes(Foo.class).withMixins(CustomFooMixin.class);
    module.entities(FooEntity.class).withTypes(Foo.class);
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 28 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class DerbySQLEntityStoreTest 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("derby-datasource-service").visibleIn(Visibility.module).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
    // DataSource
    new DataSourceAssembler().withDataSourceServiceIdentity("derby-datasource-service").identifiedBy("derby-datasource").visibleIn(Visibility.module).withCircuitBreaker().assemble(module);
    // SQL EntityStore
    new DerbySQLEntityStoreAssembler().visibleIn(Visibility.application).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) DerbySQLEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.DerbySQLEntityStoreAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)

Example 29 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class SQLiteEntityStoreTest 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("sqlite-datasource-service").visibleIn(Visibility.module).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
    // DataSource
    new DataSourceAssembler().withDataSourceServiceIdentity("sqlite-datasource-service").identifiedBy("sqlite-datasource").visibleIn(Visibility.module).withCircuitBreaker().assemble(module);
    // SQL EntityStore
    new SQLiteEntityStoreAssembler().visibleIn(Visibility.application).withConfig(config).withConfigVisibility(Visibility.layer).assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) DataSourceAssembler(org.qi4j.library.sql.assembly.DataSourceAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) DBCPDataSourceServiceAssembler(org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler) OrgJsonValueSerializationAssembler(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler) SQLiteEntityStoreAssembler(org.qi4j.entitystore.sql.assembly.SQLiteEntityStoreAssembler)

Example 30 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class RDFPerformanceTest method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(FileConfigurationService.class);
    ModuleAssembly prefModule = module.layer().module("PrefModule");
    prefModule.entities(NativeConfiguration.class).visibleIn(Visibility.application);
    prefModule.forMixin(NativeConfiguration.class).declareDefaults().tripleIndexes().set("spoc,cspo");
    new EntityTestAssembler().assemble(prefModule);
    module.entities(ExampleEntity.class);
    EntityTestAssembler testAss = new EntityTestAssembler();
    testAss.assemble(module);
    Assembler rdfAssembler = new RdfNativeSesameStoreAssembler();
    rdfAssembler.assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) Assembler(org.qi4j.bootstrap.Assembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) NativeConfiguration(org.qi4j.library.rdf.repository.NativeConfiguration)

Aggregations

EntityTestAssembler (org.qi4j.test.EntityTestAssembler)137 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)51 OrgJsonValueSerializationAssembler (org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)20 SingletonAssembler (org.qi4j.bootstrap.SingletonAssembler)13 RdfMemoryStoreAssembler (org.qi4j.index.rdf.assembly.RdfMemoryStoreAssembler)10 Test (org.junit.Test)9 FileConfigurationService (org.qi4j.library.fileconfig.FileConfigurationService)8 DataSourceAssembler (org.qi4j.library.sql.assembly.DataSourceAssembler)8 NativeConfiguration (org.qi4j.library.rdf.repository.NativeConfiguration)7 AssemblyException (org.qi4j.bootstrap.AssemblyException)6 ShiroIniConfiguration (org.qi4j.library.shiro.ini.ShiroIniConfiguration)6 DBCPDataSourceServiceAssembler (org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler)6 File (java.io.File)5 UnitOfWork (org.qi4j.api.unitofwork.UnitOfWork)5 RdfNativeSesameStoreAssembler (org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler)5 Module (org.qi4j.api.structure.Module)4 JdbmConfiguration (org.qi4j.entitystore.jdbm.JdbmConfiguration)4 JdbmEntityStoreAssembler (org.qi4j.entitystore.jdbm.assembly.JdbmEntityStoreAssembler)4 ESFilesystemIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler)4 CurrentUserUoWPrincipal (org.qi4j.library.eventsourcing.domain.factory.CurrentUserUoWPrincipal)4