Search in sources :

Example 1 with DataInputPeriod

use of org.hisp.dhis.dataset.DataInputPeriod in project dhis2-core by dhis2.

the class DataInputPeriodObjectBundleHook method setPeriod.

private void setPeriod(IdentifiableObject object) {
    DataInputPeriod dataInputPeriod = (DataInputPeriod) object;
    Period period = periodService.getPeriod(dataInputPeriod.getPeriod().getIsoDate());
    dataInputPeriod.setPeriod(period);
    sessionFactory.getCurrentSession().save(period);
}
Also used : DataInputPeriod(org.hisp.dhis.dataset.DataInputPeriod) Period(org.hisp.dhis.period.Period) DataInputPeriod(org.hisp.dhis.dataset.DataInputPeriod)

Aggregations

DataInputPeriod (org.hisp.dhis.dataset.DataInputPeriod)1 Period (org.hisp.dhis.period.Period)1