@Override public void save(Bzperiod record) { Chronometer chrono = this.startNewChronometer(); try { boolean isNew = (record.getId() == 0) ? true : false; this.save(record, isNew); } catch (HibernateException ex) { LOGGER.error(ex.getMessage()); } finally { chrono.stop(); this.stopChronometerAndLogMessage(chrono, PeriodDAO.class.getName() + ", save function"); } }
@SuppressWarnings("unchecked") @Override public Set<Bzperiod> select() { Set<Bzperiod> bzPeriodSet = null; Chronometer chrono = this.startNewChronometer(); try { Query query = this.createQuery(this.getSelectStatementWithoutWhere()); bzPeriodSet = new HashSet<>(query.list()); } catch (HibernateException ex) { LOGGER.error(ex.getMessage()); } finally { chrono.stop(); this.stopChronometerAndLogMessage(chrono, PeriodDAO.class.getName() + ", Select function"); } return bzPeriodSet; }