Search in sources :

Example 1 with BaseBatch

use of com.axelor.apps.base.db.BaseBatch in project axelor-open-suite by axelor.

the class BaseBatchController method actionSynchronizeCalendars.

public void actionSynchronizeCalendars(ActionRequest request, ActionResponse response) {
    try {
        BaseBatch baseBatch = request.getContext().asType(BaseBatch.class);
        baseBatch = Beans.get(BaseBatchRepository.class).find(baseBatch.getId());
        Batch batch = Beans.get(BaseBatchService.class).synchronizeCalendars(baseBatch);
        response.setFlash(batch.getComments());
    } catch (Exception e) {
        TraceBackService.trace(response, e);
    } finally {
        response.setReload(true);
    }
}
Also used : BaseBatch(com.axelor.apps.base.db.BaseBatch) Batch(com.axelor.apps.base.db.Batch) BaseBatch(com.axelor.apps.base.db.BaseBatch) BaseBatchService(com.axelor.apps.base.service.batch.BaseBatchService) AxelorException(com.axelor.exception.AxelorException)

Example 2 with BaseBatch

use of com.axelor.apps.base.db.BaseBatch in project axelor-open-suite by axelor.

the class BaseBatchBaseRepository method copy.

@Override
public BaseBatch copy(BaseBatch entity, boolean deep) {
    BaseBatch copy = super.copy(entity, deep);
    copy.setBatchList(null);
    return copy;
}
Also used : BaseBatch(com.axelor.apps.base.db.BaseBatch)

Aggregations

BaseBatch (com.axelor.apps.base.db.BaseBatch)2 Batch (com.axelor.apps.base.db.Batch)1 BaseBatchService (com.axelor.apps.base.service.batch.BaseBatchService)1 AxelorException (com.axelor.exception.AxelorException)1