use of org.mifos.reports.exceptions.ReportException in project head by mifos.
the class ReportsPersistence method createReportsDataSource.
public void createReportsDataSource(ReportsDataSource reportsDataSource) throws ApplicationException, SystemException {
Session session = null;
try {
session = StaticHibernateUtil.getSessionTL();
StaticHibernateUtil.startTransaction();
session.save(reportsDataSource);
session.flush();
StaticHibernateUtil.commitTransaction();
} catch (HibernateProcessException hpe) {
StaticHibernateUtil.rollbackTransaction();
throw new ApplicationException(hpe);
} catch (HibernateException e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} catch (Exception e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} finally {
StaticHibernateUtil.closeSession();
}
}
use of org.mifos.reports.exceptions.ReportException in project head by mifos.
the class ReportsPersistence method deleteReportsParamsMap.
/**
* Deletes a link between report and a parameter
*/
public void deleteReportsParamsMap(ReportsParamsMapValue reportsParamsMapValue) throws ApplicationException, SystemException {
Session session = null;
try {
session = StaticHibernateUtil.getSessionTL();
StaticHibernateUtil.startTransaction();
session.delete(reportsParamsMapValue);
session.flush();
StaticHibernateUtil.commitTransaction();
} catch (HibernateProcessException hpe) {
StaticHibernateUtil.rollbackTransaction();
throw new ApplicationException(hpe);
} catch (HibernateException e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} catch (Exception e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} finally {
StaticHibernateUtil.closeSession();
}
}
use of org.mifos.reports.exceptions.ReportException in project head by mifos.
the class ReportsPersistence method deleteReportParams.
public void deleteReportParams(ReportsParamsValue reportsParams) throws ApplicationException, SystemException {
Session session = null;
try {
session = StaticHibernateUtil.getSessionTL();
StaticHibernateUtil.startTransaction();
session.delete(reportsParams);
session.flush();
StaticHibernateUtil.commitTransaction();
} catch (HibernateProcessException hpe) {
StaticHibernateUtil.rollbackTransaction();
throw new ApplicationException(hpe);
} catch (HibernateException e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} catch (Exception e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} finally {
StaticHibernateUtil.closeSession();
}
}
use of org.mifos.reports.exceptions.ReportException in project head by mifos.
the class ReportsPersistence method updateReportsJasperMap.
/**
* sets a link between report and a jasper file
*/
public void updateReportsJasperMap(ReportsJasperMap reportsJasperMap) throws ApplicationException, SystemException {
Session session = null;
try {
session = StaticHibernateUtil.getSessionTL();
StaticHibernateUtil.startTransaction();
session.update(reportsJasperMap);
session.flush();
StaticHibernateUtil.commitTransaction();
} catch (HibernateProcessException e) {
StaticHibernateUtil.rollbackTransaction();
throw new ApplicationException(e);
} catch (HibernateException e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} catch (Exception e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} finally {
StaticHibernateUtil.closeSession();
}
}
use of org.mifos.reports.exceptions.ReportException in project head by mifos.
the class ReportsPersistence method deleteReportsDataSource.
public void deleteReportsDataSource(ReportsDataSource reportsDataSource) throws ApplicationException, SystemException {
Session session = null;
try {
session = StaticHibernateUtil.getSessionTL();
StaticHibernateUtil.startTransaction();
session.delete(reportsDataSource);
session.flush();
StaticHibernateUtil.commitTransaction();
} catch (HibernateProcessException hpe) {
StaticHibernateUtil.rollbackTransaction();
throw new ApplicationException(hpe);
} catch (HibernateException e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} catch (Exception e) {
StaticHibernateUtil.rollbackTransaction();
throw new ReportException(ReportsConstants.CREATE_FAILED_EXCEPTION, e);
} finally {
StaticHibernateUtil.closeSession();
}
}
Aggregations