@SuppressWarnings("unchecked")
	public T findById(ID id) {
		if(id == null){
			return null;
		}
		Session session = HibernateUtil.getSessionFactory().openSession();
		Transaction transaction = session.beginTransaction();
		T entity = (T) session.get(getPersistentClass(), id);
		transaction.commit();
		session.close();
		return entity;
	}