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


Java AssociationType.isEntityType方法代码示例

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


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

示例1: isJoinedFetchEnabledInMapping

import org.hibernate.type.AssociationType; //导入方法依赖的package包/类
/**
 * Does the mapping, and Hibernate default semantics, specify that
 * this association should be fetched by outer joining
 */
protected boolean isJoinedFetchEnabledInMapping(FetchMode config, AssociationType type) 
throws MappingException {
	if ( !type.isEntityType() && !type.isCollectionType() ) {
		return false;
	}
	else {
		if (config==FetchMode.JOIN) return true;
		if (config==FetchMode.SELECT) return false;
		if ( type.isEntityType() ) {
			//TODO: look at the owning property and check that it 
			//      isn't lazy (by instrumentation)
			EntityType entityType =(EntityType) type;
			EntityPersister persister = getFactory().getEntityPersister( entityType.getAssociatedEntityName() );
			return !persister.hasProxy();
		}
		else {
			return false;
		}
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:25,代码来源:JoinWalker.java

示例2: isSubsequentSelectDelayed

import org.hibernate.type.AssociationType; //导入方法依赖的package包/类
private static boolean isSubsequentSelectDelayed(AssociationType type, SessionFactoryImplementor sessionFactory) {
	if ( type.isAnyType() ) {
		// we'd need more context here.  this is only kept as part of the property state on the owning entity
		return false;
	}
	else if ( type.isEntityType() ) {
		return ( (EntityPersister) type.getAssociatedJoinable( sessionFactory ) ).hasProxy();
	}
	else {
		final CollectionPersister cp = ( (CollectionPersister) type.getAssociatedJoinable( sessionFactory ) );
		return cp.isLazy() || cp.isExtraLazy();
	}
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:FetchStrategyHelper.java

示例3: isJoinedFetchEnabled

import org.hibernate.type.AssociationType; //导入方法依赖的package包/类
@Override
   protected boolean isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle) {
	return ( type.isEntityType() || type.isCollectionType() ) &&
			( cascadeStyle==null || cascadeStyle.doCascade(cascadeAction) );
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:6,代码来源:CascadeEntityJoinWalker.java

示例4: isJoinedFetchEnabled

import org.hibernate.type.AssociationType; //导入方法依赖的package包/类
protected boolean isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle) {
	return ( type.isEntityType() || type.isCollectionType() ) &&
			( cascadeStyle==null || cascadeStyle.doCascade(cascadeAction) );
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:5,代码来源:CascadeEntityJoinWalker.java

示例5: isJoinedFetchEnabled

import org.hibernate.type.AssociationType; //导入方法依赖的package包/类
/**
 * Override on subclasses to enable or suppress joining 
 * of certain association types
 */
protected boolean isJoinedFetchEnabled(AssociationType type, FetchMode config, CascadeStyle cascadeStyle) {
	return type.isEntityType() && isJoinedFetchEnabledInMapping(config, type) ;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:8,代码来源:JoinWalker.java


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