List of usage examples for org.hibernate Query list
List<R> list();
From source file:bbdd.Partida_PublicaDAO.java
public static List queryPartida_Publica(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Partida_Publica as Partida_Publica"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//from www . j ava 2 s . co m Query query = session.createQuery(sb.toString()); query.setLockMode("this", lockMode); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.Partida_registradoDAO.java
public static List queryPartida_registrado(PersistentSession session, String condition, String orderBy) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Partida_registrado as Partida_registrado"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//from ww w. j av a 2s . com Query query = session.createQuery(sb.toString()); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.Partida_registradoDAO.java
public static List queryPartida_registrado(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Partida_registrado as Partida_registrado"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//w w w. j ava 2s.c om Query query = session.createQuery(sb.toString()); query.setLockMode("this", lockMode); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.SugerenciaDAO.java
public static List querySugerencia(PersistentSession session, String condition, String orderBy) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Sugerencia as Sugerencia"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*w ww . ja v a2s . co m*/ Query query = session.createQuery(sb.toString()); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.SugerenciaDAO.java
public static List querySugerencia(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Sugerencia as Sugerencia"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*www . j a va 2s . c o m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("this", lockMode); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.UsuarioDAO.java
public static List queryUsuario(PersistentSession session, String condition, String orderBy) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Usuario as Usuario"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {// w w w . j ava 2s .com Query query = session.createQuery(sb.toString()); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.UsuarioDAO.java
public static List queryUsuario(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Usuario as Usuario"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from w w w. j ava 2 s . c o m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("this", lockMode); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.Usuario_no_IdentificadoDAO.java
public static List queryUsuario_no_Identificado(PersistentSession session, String condition, String orderBy) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Usuario_no_Identificado as Usuario_no_Identificado"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from w w w .jav a2s . c om*/ Query query = session.createQuery(sb.toString()); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.Usuario_no_IdentificadoDAO.java
public static List queryUsuario_no_Identificado(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Usuario_no_Identificado as Usuario_no_Identificado"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {// w w w.ja v a 2s . c o m Query query = session.createQuery(sb.toString()); query.setLockMode("this", lockMode); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }
From source file:bbdd.Usuario_RegistradoDAO.java
public static List queryUsuario_Registrado(PersistentSession session, String condition, String orderBy) throws PersistentException { StringBuffer sb = new StringBuffer("From bbdd.Usuario_Registrado as Usuario_Registrado"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//from w w w. j a va 2 s . co m Query query = session.createQuery(sb.toString()); return query.list(); } catch (Exception e) { e.printStackTrace(); throw new PersistentException(e); } }