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_formatquestionnaireDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_formatquestionnaireByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_formatquestionnaire as Ktek_formatquestionnaire"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {// ww w.j a va2 s. c om Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_formatquestionnaire", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_formatquestionnaireByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_languageDAOImpl.java
License:Open Source License
public List queryKtek_language(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_language as Ktek_language"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from ww w . j a va 2 s .com*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_language", lockMode); return query.list(); } catch (Exception e) { _logger.error("listKtek_languageByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_languageDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_languageByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_language as Ktek_language"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*from ww w .j a va2s .co m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_language", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_languageByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_parameterDAOImpl.java
License:Open Source License
public List queryKtek_parameter(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_parameter as Ktek_parameter"); 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_parameter", lockMode); return query.list(); } catch (Exception e) { _logger.error("listKtek_parameterByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_parameterDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_parameterByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_parameter as Ktek_parameter"); 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_parameter", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_parameterByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_pathologyDAOImpl.java
License:Open Source License
public List queryKtek_pathology(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_pathology as Ktek_pathology"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {//from w ww .j av a 2s. c o m Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_pathology", lockMode); return query.list(); } catch (Exception e) { _logger.error("listKtek_pathologyByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_pathologyDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_pathologyByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer("From es.tekniker.framework.ktek.Ktek_pathology as Ktek_pathology"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/*w ww .jav a 2 s . c o m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_pathology", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_pathologyByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_qitem_sectionDAOImpl.java
License:Open Source License
public List queryKtek_qitem_section(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_qitem_section as Ktek_qitem_section"); 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()); query.setLockMode("Ktek_qitem_section", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_qitem_sectionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_qitem_sectionDAOImpl.java
License:Open Source License
public java.util.Iterator iterateKtek_qitem_sectionByQuery(PersistentSession session, String condition, String orderBy, org.hibernate.LockMode lockMode) throws PersistentException { StringBuffer sb = new StringBuffer( "From es.tekniker.framework.ktek.Ktek_qitem_section as Ktek_qitem_section"); if (condition != null) sb.append(" Where ").append(condition); if (orderBy != null) sb.append(" Order By ").append(orderBy); try {/* ww w .j av a 2 s . c o m*/ Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_qitem_section", lockMode); return query.iterate(); } catch (Exception e) { _logger.error( "iterateKtek_qitem_sectionByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }
From source file:es.tekniker.framework.ktek.impl.Ktek_qsection_questionnaireDAOImpl.java
License:Open Source License
public List queryKtek_qsection_questionnaire(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 {//ww w. j a va2 s. com Query query = session.createQuery(sb.toString()); query.setLockMode("Ktek_qsection_questionnaire", lockMode); return query.list(); } catch (Exception e) { _logger.error( "listKtek_qsection_questionnaireByQuery(PersistentSession session, String condition, String orderBy)", e); throw new PersistentException(e); } }