class DBReportRequestStateManager extends DBManager<ReportRequestState> implements ReportRequestStateManager {

    @Override
    public final ReportRequestState saveState(final ReportRequestState state) {
        if (state.getId() == null) {
            return save(state);
        } else {
            update(state);
            ReportRequestState updatedState = getState(state.getDevice());
            LOGGER.debug("Updated ReportRequestState: {}", updatedState);
            return updatedState;
        }
    }

    public  DBReportRequestStateManager(final SessionFactory sessionFactory);

}