class DBBaselineManager extends DBManager<Baseline> implements BaselineManager {

    @Override
    public final List<Baseline> getBaselineList(final Class<? extends Baseline> clazz)
            throws BaselineManagerException {
        LOGGER.debug("Getting baseline list");
        final List<Baseline> baselines = new ArrayList<>();

        Class<? extends Baseline> searchClass = clazz;
        if (clazz == null) {
            LOGGER.debug("null clazz, using Baseline as the default search class");
            searchClass = Baseline.class;
        }

        Session session = getFactory().getCurrentSession();
        Transaction tx = session.beginTransaction();
        try {
            Criteria criteria = session.createCriteria(searchClass)
                    .add(Restrictions.isNull("archivedTime"))
                    .setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
            List list = criteria.list();
            for (Object o : list) {
                if (o instanceof Baseline) {
                    baselines.add((Baseline) o);
                }
            }
            tx.commit();
            LOGGER.debug("Got {} baselines", baselines.size());
        } catch (HibernateException e) {
            LOGGER.error("Unable to retrieve baselines", e);
            LOGGER.debug("Rolling back transaction");
            tx.rollback();
            throw e;
        }

        LOGGER.debug("Got {} baselines", baselines.size());
        return baselines;
    }

    public  DBBaselineManager(final SessionFactory sessionFactory);

}