@Override public int getCount(ForeignPK foreignPK, int action, String objectType) { Connection con = getConnection(); try { return HistoryObjectDAO.getCount(con, foreignPK, action, historyTableName, objectType); } catch (Exception e) { throw new StatisticRuntimeException( "StatisticBmEJB().getCount()", SilverpeasRuntimeException.ERROR, "statistic.CANNOT_GET_HISTORY_STATISTICS_PUBLICATION", e); } finally { DBUtil.close(con); } }
public int getCount(ForeignPK foreignPK, int action, String objectType) { int nb = 0; Connection con = null; try { con = getConnection(); nb = HistoryObjectDAO.getCount(con, foreignPK, action, historyTableName, objectType); return nb; } catch (Exception e) { throw new StatisticRuntimeException( "StatisticBmEJB().getCount()", SilverpeasRuntimeException.ERROR, "statistic.CANNOT_GET_HISTORY_STATISTICS_PUBLICATION", e); } finally { freeConnection(con); } }