List of usage examples for org.hibernate Query setLockMode
Query<R> setLockMode(String alias, LockMode lockMode);
From source file:es.tekniker.framework.ktek.impl.Ktek_qsection_questionnaireDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_qsection_questionnaireByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_qsection_questionnaire as Ktek_qsection_questionnaire"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//w w w. j av a2s. com Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_qsection_questionnaire", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_qsection_questionnaireByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionDAOImpl.java
License:Open Source License
public List queryKtek_question(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_question as Ktek_question"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {// www.j a v a 2 s .c om Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_question", lockMode); return query.list(); } catch (Exception e) { _logger.error("listKtek_questionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_questionByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_question as Ktek_question"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from w ww .j av a 2 s. co m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_question", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_questionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnaireconfigurationDAOImpl.java
License:Open Source License
public List queryKtek_questionnaireconfiguration(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnaireconfiguration as Ktek_questionnaireconfiguration"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/* w w w. jav a2 s .c om*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaireconfiguration", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_questionnaireconfigurationByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnaireconfigurationDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_questionnaireconfigurationByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnaireconfiguration as Ktek_questionnaireconfiguration"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/* ww w . j a v a2s .c om*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaireconfiguration", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_questionnaireconfigurationByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnaireDAOImpl.java
License:Open Source License
public List queryKtek_questionnaire(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnaire as Ktek_questionnaire"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//from ww w. jav a 2 s . c om Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaire", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_questionnaireByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnaireDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_questionnaireByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnaire as Ktek_questionnaire"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from www . j av a 2 s . c om*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaire", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_questionnaireByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnaireitemDAOImpl.java
License:Open Source License
public List queryKtek_questionnaireitem(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnaireitem as Ktek_questionnaireitem"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {// ww w.ja va2 s. co m Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaireitem", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_questionnaireitemByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnaireitemDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_questionnaireitemByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnaireitem as Ktek_questionnaireitem"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//w ww . j av a2s . c o m Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaireitem", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_questionnaireitemByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnaireitem_codificationDAOImpl.java
License:Open Source License
public List queryKtek_questionnaireitem_codification(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnaireitem_codification as Ktek_questionnaireitem_codification"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {// w w w . ja va 2s.c om Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaireitem_codification", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_questionnaireitem_codificationByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }