From 97b1b48d462aa2c7e854ec8ea13c826319eca598 Mon Sep 17 00:00:00 2001 From: "luca.frosini" Date: Fri, 18 May 2018 14:26:33 +0000 Subject: [PATCH] git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/accounting/accounting-dashboard-harvester-se-plugin@167603 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../dataharvest/dao/DatabaseManager.java | 28 ++----------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/main/java/org/gcube/dataharvest/dao/DatabaseManager.java b/src/main/java/org/gcube/dataharvest/dao/DatabaseManager.java index 635748a..52fb7fb 100644 --- a/src/main/java/org/gcube/dataharvest/dao/DatabaseManager.java +++ b/src/main/java/org/gcube/dataharvest/dao/DatabaseManager.java @@ -15,42 +15,19 @@ public class DatabaseManager { private static Logger logger = LoggerFactory.getLogger(DatabaseManager.class); - public DatabaseManager() { - - } - public void insertMonthlyData(Date from, Date to, List data, boolean updateFlag) { Dao dao = null; try { dao = dbConnect(); dao.insertMonthlyMeasure(data, from, to, updateFlag); } catch(Exception e) { - logger.error(e.getLocalizedMessage()); + logger.error("", e); } finally { if(dao != null) { try { dao.disconnect(); } catch(DaoException e) { - logger.error(e.getLocalizedMessage()); - } - } - } - } - - public String[] getActiveVres() { - Dao dao = null; - try { - dao = dbConnect(); - return dao.getActiveVres(); - } catch(Exception e) { - logger.error(e.getLocalizedMessage()); - return null; - } finally { - if(dao != null) { - try { - dao.disconnect(); - } catch(DaoException e) { - logger.error(e.getLocalizedMessage()); + logger.error("", e); } } } @@ -64,5 +41,4 @@ public class DatabaseManager { dao.connect(dcd.getURI(), dcd.getUser(), dcd.getPassword()); return dao; } - }