Tema: consulta hql
Ver Mensaje Individual
  #2 (permalink)  
Antiguo 01/03/2012, 05:01
Avatar de Fuzzylog
Fuzzylog
 
Fecha de Ingreso: agosto-2008
Ubicación: En internet
Mensajes: 2.511
Antigüedad: 15 años, 8 meses
Puntos: 188
Respuesta: consulta hql

//Para la de buscar por password Revisa a partir de la linea 18 ... debería quedarte algo como....
String hql = "select nombre from MIEMBRO where nombre=:password";
Query queryList = getHibernateTemplate().getSessionFactory()
.getCurrentSession().createQuery(hql);

if (password != null) {
queryList.setParameter("password ", password );
}

if (queryList.list() != null && !queryList.list().isEmpty()) {
encontrado = true;
}
return encontrado;
}

// Para el login sería algo similar
__________________
if (fuzzy && smooth) {
fuzzylog = "c00l";
return true;
}