当前位置: 首页>>代码示例>>Java>>正文


Java SessionImplementor.getLoadQueryInfluencers方法代码示例

本文整理汇总了Java中org.hibernate.engine.SessionImplementor.getLoadQueryInfluencers方法的典型用法代码示例。如果您正苦于以下问题:Java SessionImplementor.getLoadQueryInfluencers方法的具体用法?Java SessionImplementor.getLoadQueryInfluencers怎么用?Java SessionImplementor.getLoadQueryInfluencers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.hibernate.engine.SessionImplementor的用法示例。


在下文中一共展示了SessionImplementor.getLoadQueryInfluencers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: endRead

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
@Override
public boolean endRead() {
	//afterInitialize(); // Needed for DelayedOperations
	boolean result = super.endRead();
	((utils.OwnedSet)set).setDoEvents(true); // We should resume updating the inverse, because initialization is complete

	if(this.restoreFilter != null) {
		// Restore the filter that was enabled before enabling the filter hint
		SessionImplementor session = getSession();
		org.hibernate.engine.LoadQueryInfluencers lqi = session.getLoadQueryInfluencers();
		org.hibernate.impl.FilterImpl oldFilter = this.getAffectingFilter();
		if(oldFilter != null) lqi.disableFilter(oldFilter.getName());
		utils.QueryOptimization.restoreFilter(lqi, this.restoreFilter);
		this.restoreFilter = null;
	}

	return result;
}
 
开发者ID:webdsl,项目名称:webdsl,代码行数:19,代码来源:PersistentOwnedSet.java

示例2: getAffectingFilter

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
protected FilterImpl getAffectingFilter(utils.AbastractOwnedSetType type) {
	SessionImplementor session = getSession();
	FilterImpl filter = null;
	LoadQueryInfluencers lqi = session.getLoadQueryInfluencers();
	if(lqi != null) {
		java.util.Map filters = lqi.getEnabledFilters();
		for(Object entry : filters.entrySet()) {
			if(!(entry instanceof java.util.Map.Entry)) continue;
			Object key = ((java.util.Map.Entry)entry).getKey();
			Object value = ((java.util.Map.Entry)entry).getValue();
			if(key != null && value != null && value instanceof org.hibernate.impl.FilterImpl && type.isAffectedBy(key.toString())) {
				if(filter == null) {
					filter = (org.hibernate.impl.FilterImpl) value;
				} else {
					throw new java.lang.UnsupportedOperationException("Filters '" + filter.getName() + "' and '" + key.toString() + "' both filter the same collection role" + (getRole() == null ? "." : " (" + getRole() + ")."));
				}
			}
		}
	}
	return filter;
}
 
开发者ID:webdsl,项目名称:webdsl,代码行数:22,代码来源:PersistentOwnedSet.java

示例3: endRead

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
@Override
public boolean endRead() {
	boolean result = super.endRead();
	((utils.OwnedList)list).setDoEvents(true); // We should resume updating the inverse, because initialization is complete

	if(this.restoreFilter != null) {
		// Restore the filter that was enabled before enabling the filter hint
		SessionImplementor session = getSession();
		org.hibernate.engine.LoadQueryInfluencers lqi = session.getLoadQueryInfluencers();
		org.hibernate.impl.FilterImpl oldFilter = this.getAffectingFilter();
		if(oldFilter != null) lqi.disableFilter(oldFilter.getName());
		utils.QueryOptimization.restoreFilter(lqi, this.restoreFilter);
		this.restoreFilter = null;
	}

	return result;
}
 
开发者ID:webdsl,项目名称:webdsl,代码行数:18,代码来源:PersistentOwnedList.java

示例4: getAffectingFilter

import org.hibernate.engine.SessionImplementor; //导入方法依赖的package包/类
protected FilterImpl getAffectingFilter(utils.AbastractOwnedListType type) {
	SessionImplementor session = getSession();
	FilterImpl filter = null;
	LoadQueryInfluencers lqi = session.getLoadQueryInfluencers();
	if(lqi != null) {
		java.util.Map filters = lqi.getEnabledFilters();
		for(Object entry : filters.entrySet()) {
			if(!(entry instanceof java.util.Map.Entry)) continue;
			Object key = ((java.util.Map.Entry)entry).getKey();
			Object value = ((java.util.Map.Entry)entry).getValue();
			if(key != null && value != null && value instanceof org.hibernate.impl.FilterImpl && type.isAffectedBy(key.toString())) {
				if(filter == null) {
					filter = (org.hibernate.impl.FilterImpl) value;
				} else {
					throw new java.lang.UnsupportedOperationException("Filters '" + filter.getName() + "' and '" + key.toString() + "' both filter the same collection role" + (getRole() == null ? "." : " (" + getRole() + ")."));
				}
			}
		}
	}
	return filter;
}
 
开发者ID:webdsl,项目名称:webdsl,代码行数:22,代码来源:PersistentOwnedList.java


注:本文中的org.hibernate.engine.SessionImplementor.getLoadQueryInfluencers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。