@Override
	@SuppressWarnings("unchecked")
	public List<T> listAll() {
		Session session = HibernateUtil.getSession();
		List<T> emps = null;
		try {
			session.beginTransaction();
			Criteria query = session.createCriteria(clazz);
			emps = query.list();
			session.getTransaction().commit();
		} catch (HibernateException e) {
			session.getTransaction().rollback();
			error = e;
		} finally {
			HibernateUtil.closeSession();
		}
		return emps;
	}