Search in sources :

Example 1 with NwSetDao

use of org.openlca.core.database.NwSetDao in project olca-modules by GreenDelta.

the class Sequence method init.

private void init(IDatabase db) {
    index(CATEGORY, new CategoryDao(db));
    index(LOCATION, new LocationDao(db));
    index(ACTOR, new ActorDao(db));
    index(SOURCE, new SourceDao(db));
    index(UNIT, new UnitDao(db));
    index(UNIT_GROUP, new UnitGroupDao(db));
    index(FLOW_PROPERTY, new FlowPropertyDao(db));
    index(FLOW, new FlowDao(db));
    index(CURRENCY, new CurrencyDao(db));
    index(PROCESS, new ProcessDao(db));
    index(PRODUCT_SYSTEM, new ProductSystemDao(db));
    index(IMPACT_CATEGORY, new ImpactCategoryDao(db));
    index(IMPACT_METHOD, new ImpactMethodDao(db));
    index(NW_SET, new NwSetDao(db));
    index(PROJECT, new ProjectDao(db));
    index(DQ_SYSTEM, new DQSystemDao(db));
    index(SOCIAL_INDICATOR, new SocialIndicatorDao(db));
}
Also used : SourceDao(org.openlca.core.database.SourceDao) CurrencyDao(org.openlca.core.database.CurrencyDao) ImpactCategoryDao(org.openlca.core.database.ImpactCategoryDao) CategoryDao(org.openlca.core.database.CategoryDao) ActorDao(org.openlca.core.database.ActorDao) FlowPropertyDao(org.openlca.core.database.FlowPropertyDao) LocationDao(org.openlca.core.database.LocationDao) UnitDao(org.openlca.core.database.UnitDao) DQSystemDao(org.openlca.core.database.DQSystemDao) NwSetDao(org.openlca.core.database.NwSetDao) FlowDao(org.openlca.core.database.FlowDao) ImpactMethodDao(org.openlca.core.database.ImpactMethodDao) ProcessDao(org.openlca.core.database.ProcessDao) UnitGroupDao(org.openlca.core.database.UnitGroupDao) SocialIndicatorDao(org.openlca.core.database.SocialIndicatorDao) ImpactCategoryDao(org.openlca.core.database.ImpactCategoryDao) ProductSystemDao(org.openlca.core.database.ProductSystemDao) ProjectDao(org.openlca.core.database.ProjectDao)

Example 2 with NwSetDao

use of org.openlca.core.database.NwSetDao in project olca-modules by GreenDelta.

the class NwSetSyncTest method before.

@Before
public void before() throws IOException {
    db.clear();
    dao = new NwSetDao(db);
    allData = SyncTestUtils.copyToTemp("nw_set_sync-all.zip");
    nwSetData = SyncTestUtils.copyToTemp("nw_set_sync-impact_method.zip");
}
Also used : NwSetDao(org.openlca.core.database.NwSetDao) Before(org.junit.Before)

Example 3 with NwSetDao

use of org.openlca.core.database.NwSetDao in project olca-app by GreenDelta.

the class CalculationSetupSection method addListeners.

private void addListeners() {
    methodCombo.addSelectionChangedListener(this::onMethodChange);
    nwSetCombo.addSelectionChangedListener(d -> {
        var project = editor.getModel();
        project.nwSet = d == null ? null : new NwSetDao(db).getForId(d.id);
        editor.setDirty(true);
    });
}
Also used : NwSetDao(org.openlca.core.database.NwSetDao)

Aggregations

NwSetDao (org.openlca.core.database.NwSetDao)3 Before (org.junit.Before)1 ActorDao (org.openlca.core.database.ActorDao)1 CategoryDao (org.openlca.core.database.CategoryDao)1 CurrencyDao (org.openlca.core.database.CurrencyDao)1 DQSystemDao (org.openlca.core.database.DQSystemDao)1 FlowDao (org.openlca.core.database.FlowDao)1 FlowPropertyDao (org.openlca.core.database.FlowPropertyDao)1 ImpactCategoryDao (org.openlca.core.database.ImpactCategoryDao)1 ImpactMethodDao (org.openlca.core.database.ImpactMethodDao)1 LocationDao (org.openlca.core.database.LocationDao)1 ProcessDao (org.openlca.core.database.ProcessDao)1 ProductSystemDao (org.openlca.core.database.ProductSystemDao)1 ProjectDao (org.openlca.core.database.ProjectDao)1 SocialIndicatorDao (org.openlca.core.database.SocialIndicatorDao)1 SourceDao (org.openlca.core.database.SourceDao)1 UnitDao (org.openlca.core.database.UnitDao)1 UnitGroupDao (org.openlca.core.database.UnitGroupDao)1