use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class PreferencesEntityStoreTest method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
module.layer().application().setName("PreferencesTest");
super.assemble(module);
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(null);
PreferencesEntityStoreInfo metaInfo = new PreferencesEntityStoreInfo(Preferences.userNodeForPackage(getClass()));
Thread.currentThread().setContextClassLoader(cl);
module.services(PreferencesEntityStoreService.class).setMetaInfo(metaInfo).instantiateOnStartup();
new OrgJsonValueSerializationAssembler().assemble(module);
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class JniLevelDBEntityStoreTest method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
super.assemble(module);
ModuleAssembly config = module.layer().module("config");
new EntityTestAssembler(Visibility.module).assemble(config);
new OrgJsonValueSerializationAssembler().assemble(module);
module.services(FileConfigurationService.class);
new LevelDBEntityStoreAssembler().withConfig(config, Visibility.layer).identifiedBy("jni-leveldb-entitystore").assemble(module);
config.forMixin(LevelDBEntityStoreConfiguration.class).declareDefaults().flavour().set("jni");
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class MemoryEntityStoreTest method assemble.
// START SNIPPET: assembly
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
new MemoryEntityStoreAssembler().assemble(module);
// END SNIPPET: assembly
new OrgJsonValueSerializationAssembler().assemble(module);
super.assemble(module);
// START SNIPPET: assembly
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class MongoMapEntityStoreTest 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");
config.services(MemoryEntityStoreService.class);
new OrgJsonValueSerializationAssembler().assemble(module);
// START SNIPPET: assembly
new MongoMapEntityStoreAssembler().withConfigModule(config).assemble(module);
// END SNIPPET: assembly
MongoEntityStoreConfiguration mongoConfig = config.forMixin(MongoEntityStoreConfiguration.class).declareDefaults();
mongoConfig.writeConcern().set(MongoEntityStoreConfiguration.WriteConcern.FSYNC_SAFE);
mongoConfig.database().set("qi4j:test");
mongoConfig.collection().set("qi4j:test:entities");
// START SNIPPET: assembly
}
use of org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler in project qi4j-sdk by Qi4j.
the class SimpleNeoStoreTest method assemble.
public void assemble(ModuleAssembly module) throws AssemblyException {
module.layer().application().setName("SimpleNeoTest");
super.assemble(module);
module.services(FileConfigurationService.class);
module.services(NeoEntityStoreService.class);
ModuleAssembly configModule = module.layer().module("config");
configModule.entities(NeoConfiguration.class).visibleIn(Visibility.layer);
new EntityTestAssembler().assemble(configModule);
new OrgJsonValueSerializationAssembler().assemble(module);
}
Aggregations