本文整理了Java中org.hibernate.Hibernate.close()
方法的一些代码示例,展示了Hibernate.close()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Hibernate.close()
方法的具体详情如下:
包路径:org.hibernate.Hibernate
类名称:Hibernate
方法名:close
[英]Close an Iterator instances obtained from org.hibernate.Query#iterate() immediately instead of waiting until the session is closed or disconnected.
[中]关闭从org获取的迭代器实例。冬眠立即查询#iterate(),而不是等待会话关闭或断开连接。
代码示例来源:origin: spring-projects/spring-framework
@Deprecated
@Override
public void closeIterator(Iterator<?> it) throws DataAccessException {
try {
Hibernate.close(it);
}
catch (HibernateException ex) {
throw SessionFactoryUtils.convertHibernateAccessException(ex);
}
}
代码示例来源:origin: org.springframework/spring-orm
@Deprecated
@Override
public void closeIterator(Iterator<?> it) throws DataAccessException {
try {
Hibernate.close(it);
}
catch (HibernateException ex) {
throw SessionFactoryUtils.convertHibernateAccessException(ex);
}
}
代码示例来源:origin: hibernate/hibernate-orm
Hibernate.close( itr );
代码示例来源:origin: apache/servicemix-bundles
@Deprecated
@Override
public void closeIterator(Iterator<?> it) throws DataAccessException {
try {
Hibernate.close(it);
}
catch (HibernateException ex) {
throw SessionFactoryUtils.convertHibernateAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void closeIterator(Iterator<?> it) throws DataAccessException {
try {
Hibernate.close(it);
}
catch (HibernateException ex) {
throw SessionFactoryUtils.convertHibernateAccessException(ex);
}
}
代码示例来源:origin: apache/servicemix-bundles
@Override
public void closeIterator(Iterator<?> it) throws DataAccessException {
try {
Hibernate.close(it);
}
catch (HibernateException ex) {
throw SessionFactoryUtils.convertHibernateAccessException(ex);
}
}
代码示例来源:origin: org.wso2.bpel/ode-dao-hibernate
@SuppressWarnings("unchecked")
public Collection<ActivityRecoveryDAO> getActivityRecoveries() {
entering("ProcessInstanceDaoImpl.getActivityRecoveries");
List<ActivityRecoveryDAO> results = new ArrayList<ActivityRecoveryDAO>();
Query qry = getSession().createQuery(QRY_RECOVERIES);
qry.setLong(0, _instance.getId());
Iterator iter = qry.iterate();
while (iter.hasNext())
results.add(new ActivityRecoveryDaoImpl(_sm, (HActivityRecovery) iter.next()));
Hibernate.close(iter);
return results;
}
代码示例来源:origin: org.wso2.bpel/ode-dao-hibernate
/**
* TODO this is never used, except by test cases - should be removed
* @see org.apache.ode.bpel.dao.ProcessInstanceDAO#getVariables(java.lang.String, int)
*/
@SuppressWarnings("unchecked")
public XmlDataDAO[] getVariables(String variableName, int scopeModelId) {
entering("ProcessInstanceDaoImpl.getVariables");
List<XmlDataDAO> results = new ArrayList<XmlDataDAO>();
Iterator iter;
Query qry = getSession().createQuery(QRY_VARIABLES);
qry.setString(0, variableName);
qry.setInteger(1, scopeModelId);
qry.setLong(2, _instance.getId());
iter = qry.iterate();
while(iter.hasNext()) {
results.add(new XmlDataDaoImpl(_sm, (HXmlData)iter.next()));
}
Hibernate.close(iter);
return results.toArray(new XmlDataDAO[results.size()]);
}
代码示例来源:origin: org.wso2.bpel/ode-dao-hibernate
@SuppressWarnings("unchecked")
public CorrelatorDAO getCorrelator(String corrId) {
entering("ProcessDaoImpl.getCorrelator");
Iterator results;
Query q = getSession().createFilter(_process.getCorrelators(),
QRY_CORRELATOR);
results = q.setString(0, corrId).iterate();
if(!results.hasNext()){
String msg = "no such correlator: corrId = " + corrId;
throw new IllegalArgumentException(msg);
}
try {
return new CorrelatorDaoImpl(_sm, (HCorrelator)results.next());
} finally {
Hibernate.close(results);
}
}
代码示例来源:origin: org.wso2.bpel/ode-dao-hibernate
Hibernate.close(mcors);
内容来源于网络,如有侵权,请联系作者删除!