本文整理了Java中org.hibernate.boot.MetadataBuilder.applySharedCacheMode()
方法的一些代码示例,展示了MetadataBuilder.applySharedCacheMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetadataBuilder.applySharedCacheMode()
方法的具体详情如下:
包路径:org.hibernate.boot.MetadataBuilder
类名称:MetadataBuilder
方法名:applySharedCacheMode
[英]Specify the second-level cache mode to be used. This is the cache mode in terms of whether or not to cache.
Its default is defined by the javax.persistence.sharedCache.mode setting if using property-based configuration.
[中]
代码示例来源:origin: hibernate/hibernate-orm
metadataBuilder.applySharedCacheMode( sharedCacheMode );
代码示例来源:origin: hibernate/hibernate-orm
@Test
@TestForIssue( jiraKey = "HHH-9913" )
public void testNonAggregatedCompositeIdWithPkClass() {
// HHH-9913 reports a NPE when bootstrapping a SF with non-aggregated composite identifiers
// in org.hibernate.cache.internal.CacheDataDescriptionImpl#decode
StandardServiceRegistry ssr = new StandardServiceRegistryBuilder().build();
try {
new MetadataSources( ssr )
.addAnnotatedClass( ItWithPkClass.class )
.getMetadataBuilder()
.applySharedCacheMode( SharedCacheMode.ENABLE_SELECTIVE )
.build()
.buildSessionFactory();
}
finally {
StandardServiceRegistryBuilder.destroy( ssr );
}
}
}
代码示例来源:origin: hibernate/hibernate-orm
@Test
@TestForIssue( jiraKey = "HHH-9913" )
public void testNonAggregatedCompositeId() {
// HHH-9913 reports a NPE when bootstrapping a SF with non-aggregated composite identifiers
// in org.hibernate.cache.internal.CacheDataDescriptionImpl#decode
StandardServiceRegistry ssr = new StandardServiceRegistryBuilder()
.applySetting( AvailableSettings.USE_SECOND_LEVEL_CACHE, true )
.build();
try {
new MetadataSources( ssr )
.addAnnotatedClass( It.class )
.getMetadataBuilder()
.applySharedCacheMode( SharedCacheMode.ENABLE_SELECTIVE )
.build()
.buildSessionFactory();
}
finally {
StandardServiceRegistryBuilder.destroy( ssr );
}
}
代码示例来源:origin: org.hibernate.orm/hibernate-core
metadataBuilder.applySharedCacheMode( sharedCacheMode );
代码示例来源:origin: com.github.albfernandez/jbpm-jpdl
metadataBuilder.applySharedCacheMode( sharedCacheMode );
内容来源于网络,如有侵权,请联系作者删除!