public List<E> findByEntity(Object entity,String ent) { 
		String c = entity.getClass().getSimpleName().toLowerCase();
		String s = "select t from " +entityClass.getSimpleName() + " t where t." + c + "=:" + c;
		Object something = entity;
		String theType = ent;
		Class<?> theClass = null;
		try {
			theClass = Class.forName(theType);
		} catch (ClassNotFoundException e) {
			Log.getLogger().log(Level.SEVERE,"ClassNotFoundException", e);
		}
		Object obj = theClass.cast(something);
		Query q = entityManager.createQuery(s);
		q.setParameter(c,obj);
		return  (List<E>)q.getResultList();
	}