0
CAN SOMEONE TELL WHAT I AM DOING WRONG?
public List<Usuario> obterusuario(String user){
Consultar consulta = new Consultar ();
EntityManager obconsulta = consulta.getEntityManager();
System.out.println("passou"+user);
String query = "SELECT U FROM CADASTRO_USUARIO U WHERE U.USR_CODIGO=:user";
TypedQuery<Usuario> tq = obconsulta.createQuery(query,Usuario.class);
tq.setParameter("user", user);
return tq.getResultList( );
}