本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}