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