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_questionnaireitem_codificationDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_questionnaireitem_codificationByQuery(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 ww . j av a2s . c o m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnaireitem_codification", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_questionnaireitem_codificationByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnairesectionDAOImpl.java
License:Open Source License
public List queryKtek_questionnairesection(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnairesection as Ktek_questionnairesection"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//from ww w.ja v a 2 s . c o m Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnairesection", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_questionnairesectionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_questionnairesectionDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_questionnairesectionByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_questionnairesection as Ktek_questionnairesection"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//from w ww. java2 s. c om Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_questionnairesection", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_questionnairesectionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_result_questionnaireDAOImpl.java
License:Open Source License
public List queryKtek_result_questionnaire(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_result_questionnaire as Ktek_result_questionnaire"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {// w ww.jav a 2 s.com Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_result_questionnaire", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_result_questionnaireByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_result_questionnaireDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_result_questionnaireByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_result_questionnaire as Ktek_result_questionnaire"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from w w w. j a v a 2 s . c om*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_result_questionnaire", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_result_questionnaireByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_result_questionnaireitemDAOImpl.java
License:Open Source License
public List queryKtek_result_questionnaireitem(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_result_questionnaireitem as Ktek_result_questionnaireitem"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/* w w w. j a v a2s. co m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_result_questionnaireitem", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_result_questionnaireitemByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_result_questionnaireitemDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_result_questionnaireitemByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_result_questionnaireitem as Ktek_result_questionnaireitem"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from w w w . j av a2 s .c o m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_result_questionnaireitem", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_result_questionnaireitemByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_result_questionnairesectionDAOImpl.java
License:Open Source License
public List queryKtek_result_questionnairesection(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_result_questionnairesection as Ktek_result_questionnairesection"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//w w w. j a va 2 s .co m Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_result_questionnairesection", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_result_questionnairesectionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_result_questionnairesectionDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_result_questionnairesectionByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_result_questionnairesection as Ktek_result_questionnairesection"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//w ww. j a va 2 s .c o m Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_result_questionnairesection", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_result_questionnairesectionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_tpsettingsDAOImpl.java
License:Open Source License
public List queryKtek_tpsettings(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_tpsettings as Ktek_tpsettings"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//w w w . j a va2s. com Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_tpsettings", lockMode); return query.list(); } catch (Exception e) { _logger.error("listKtek_tpsettingsByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }