Exemplo n.º 1
0
  /** @deprecated see reportingcompatibility module */
  @Deprecated
  public void createReportObject(AbstractReportObject ro) throws DAOException {

    ReportObjectWrapper wrappedReportObject = new ReportObjectWrapper(ro);
    User user = Context.getAuthenticatedUser();
    Date now = new Date();
    wrappedReportObject.setCreator(user);
    wrappedReportObject.setDateCreated(now);
    wrappedReportObject.setVoided(false);
    sessionFactory.getCurrentSession().save(wrappedReportObject);
  }
Exemplo n.º 2
0
  /** @deprecated see reportingcompatibility module */
  @Deprecated
  public void updateReportObject(AbstractReportObject ro) throws DAOException {
    if (ro.getReportObjectId() == null) createReportObject(ro);
    else {
      sessionFactory.getCurrentSession().clear();
      ReportObjectWrapper wrappedReportObject = new ReportObjectWrapper(ro);
      User user = Context.getAuthenticatedUser();
      Date now = new Date();
      wrappedReportObject.setChangedBy(user);
      wrappedReportObject.setDateChanged(now);

      sessionFactory.getCurrentSession().saveOrUpdate(wrappedReportObject);
    }
  }