• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java SessionFactoryOptions类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.hibernate.boot.spi.SessionFactoryOptions的典型用法代码示例。如果您正苦于以下问题:Java SessionFactoryOptions类的具体用法?Java SessionFactoryOptions怎么用?Java SessionFactoryOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SessionFactoryOptions类属于org.hibernate.boot.spi包,在下文中一共展示了SessionFactoryOptions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testCreationOfSessionFactory

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
@Test
public void testCreationOfSessionFactory() {
    Properties props = getProperties();
    Config conf = ConfigFactory.parseProperties(props);

    hs = new HibernateService(conf);
    SessionFactory sf = hs.getSessionFactory();
    assertNotNull(sf);
    assertFalse(sf.isClosed());

    // traverse through the session factory to get at configuration values
    SessionFactoryOptions sfo = sf.getSessionFactoryOptions();
    StandardServiceRegistry ssr = sfo.getServiceRegistry();
    ConfigurationService cs = ssr.getService(ConfigurationService.class);
    assertEquals(props.getProperty("hibernate.connection.driver_class"), cs.getSetting("hibernate.connection.driver_class", StandardConverters.STRING));
    assertEquals(props.getProperty("hibernate.connection.url"), cs.getSetting("hibernate.connection.url", StandardConverters.STRING));
    assertEquals(props.getProperty("hibernate.dialect"), cs.getSetting("hibernate.dialect", StandardConverters.STRING));
    assertEquals(props.getProperty("hibernate.hbm2ddl.auto"), cs.getSetting("hibernate.hbm2ddl.auto", StandardConverters.STRING));

    // check mapping
    ClassMetadata cm = sf.getClassMetadata(TestObject.class);
    String[] names = cm.getPropertyNames();
    assertEquals(1, names.length);
    assertEquals("name", names[0]);
    assertEquals("string", cm.getPropertyType("name").getName());
}
 
开发者ID:DorsetProject,项目名称:dorset-framework,代码行数:27,代码来源:HibernateServiceTest.java


示例2: initiateService

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
@Override
public QueryParserService initiateService(
		SessionFactoryImplementor sessionFactory,
		SessionFactoryOptions sessionFactoryOptions,
		ServiceRegistryImplementor registry) {
	return IgniteQueryParserService.INSTANCE;
}
 
开发者ID:hibernate,项目名称:hibernate-ogm-ignite,代码行数:8,代码来源:IgniteQueryParserServiceInitiator.java


示例3: start

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
@Override
public void start(SessionFactoryOptions options, Properties properties) throws CacheException {
    // Translate the Spring URI to a real URI
    String uri = properties.getProperty(CONFIG_URI);
    Resource resource = new DefaultResourceLoader().getResource(uri);
    try {
        properties.setProperty(CONFIG_URI, resource.getURI().toString());
    }
    catch(IOException e) {
        throw new CacheException(e);
    }
    super.start(options, properties);
}
 
开发者ID:Dualion,项目名称:jhipster-ng-admin,代码行数:14,代码来源:SpringCacheRegionFactory.java


示例4: prepare

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
@Override
public void prepare(JdbcServices jdbcServices, JdbcConnectionAccess connectionAccess, MetadataImplementor metadata, SessionFactoryOptions sessionFactoryOptions) {
    ConfigurationService configService = sessionFactoryOptions.getServiceRegistry().getService(ConfigurationService.class);
    this.fullyQualifiedTableName = Objects.requireNonNull(configService.getSetting(TABLE, String.class, null), "Property " + TABLE + " must be set.");
    this.idColumn = configService.getSetting(ID_COLUMN, String.class, "ID");
    this.discriminatorColumn = configService.getSetting(DISCRIMINATOR_COLUMN, String.class, "ENTITY_NAME");
    this.cleanRows = configService.getSetting(CLEAN_ROWS, StandardConverters.BOOLEAN, false);
}
 
开发者ID:grimsa,项目名称:hibernate-single-table-bulk-id-strategy,代码行数:9,代码来源:SingleGlobalTemporaryTableBulkIdStrategy.java


示例5: start

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
/** {@inheritDoc} */
@Override public void start(SessionFactoryOptions settings, Properties props) throws CacheException {
    String accessType = props.getProperty(DFLT_ACCESS_TYPE_PROPERTY, NONSTRICT_READ_WRITE.name());

    dfltAccessType = AccessType.valueOf(accessType);

    accessStgyFactory.start(props);
}
 
开发者ID:apache,项目名称:ignite,代码行数:9,代码来源:HibernateRegionFactory.java


示例6: start

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
@Override
public void start(SessionFactoryOptions settings, Properties properties) throws CacheException {

    this.settings = settings;
    this.properties = properties;
    log.info("Starting MemcachedClient...");
    try {
        client = getMemcachedClientFactory(wrapInConfig(properties)).createMemcacheClient();
    } catch (Exception e) {
        throw new CacheException("Unable to initialize MemcachedClient", e);
    }
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:13,代码来源:MemcachedRegionFactory.java


示例7: prepare

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
@Override
public void prepare(
		JdbcServices jdbcServices,
		JdbcConnectionAccess jdbcConnectionAccess,
		MetadataImplementor metadataImplementor,
		SessionFactoryOptions sessionFactoryOptions) {

}
 
开发者ID:epiresdasilva,项目名称:cte-multi-table-bulk-id-stategy,代码行数:9,代码来源:CTEMultiTableBulkIdStrategy.java


示例8: start

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
@Override
public void start(SessionFactoryOptions settings, Properties props) throws CacheException {
    this.settings = settings;

    this.mbeanRegistrationHelper.registerMBean(this.manager, props);
}
 
开发者ID:esacinc,项目名称:sdcct,代码行数:7,代码来源:CacheRegionFactory.java


示例9: getSessionFactoryOptions

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
/** {@inheritDoc} */
@Override public SessionFactoryOptions getSessionFactoryOptions() {
    return null;
}
 
开发者ID:apache,项目名称:ignite,代码行数:5,代码来源:CacheHibernateStoreFactorySelfTest.java


示例10: MemcachedEntityRegion

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public MemcachedEntityRegion(MemcachedCache cache, SessionFactoryOptions settings, CacheDataDescription metadata, Config config) {
    super(cache, config);
    this.metadata = metadata;
    this.settings = settings;
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:6,代码来源:MemcachedEntityRegion.java


示例11: MemcachedNaturalIdRegion

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public MemcachedNaturalIdRegion(MemcachedCache cache, SessionFactoryOptions settings, CacheDataDescription metadata, Config config) {
    super(cache, config);
    this.metadata = metadata;
    this.settings = settings;
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:6,代码来源:MemcachedNaturalIdRegion.java


示例12: MemcachedCollectionRegion

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public MemcachedCollectionRegion(MemcachedCache cache, SessionFactoryOptions settings, CacheDataDescription metadata, Config config) {
    super(cache, config);
    this.metadata = metadata;
    this.settings = settings;
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:6,代码来源:MemcachedCollectionRegion.java


示例13: ReadOnlyMemcachedEntityRegionAccessStrategy

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public ReadOnlyMemcachedEntityRegionAccessStrategy(MemcachedEntityRegion region, SessionFactoryOptions settings) {
    super(region, settings);
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:4,代码来源:ReadOnlyMemcachedEntityRegionAccessStrategy.java


示例14: AbstractReadWriteMemcachedAccessStrategy

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
/**
 * Creates a read/write cache access strategy around the given cache region.
 */
public AbstractReadWriteMemcachedAccessStrategy(T region, SessionFactoryOptions settings, CacheDataDescription cacheDataDescription) {
    super(region, settings);
    this.versionComparator = cacheDataDescription.getVersionComparator();
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:8,代码来源:AbstractReadWriteMemcachedAccessStrategy.java


示例15: AbstractMemcachedAccessStrategy

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public AbstractMemcachedAccessStrategy(T region, SessionFactoryOptions settings) {
    this.region = region;
    this.settings = settings;
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:5,代码来源:AbstractMemcachedAccessStrategy.java


示例16: settings

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
/**
 * The settings for this persistence unit.
 */
protected SessionFactoryOptions settings() {
    return settings;
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:7,代码来源:AbstractMemcachedAccessStrategy.java


示例17: TransactionalMemcachedEntityRegionAccessStrategy

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public TransactionalMemcachedEntityRegionAccessStrategy(MemcachedEntityRegion aThis, MemcachedCache cache, SessionFactoryOptions settings) {
    super(aThis, settings);
    this.cache = cache;
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:5,代码来源:TransactionalMemcachedEntityRegionAccessStrategy.java


示例18: TransactionalMemcachedNaturalIdRegionAccessStrategy

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public TransactionalMemcachedNaturalIdRegionAccessStrategy(MemcachedNaturalIdRegion region,
                                                           SessionFactoryOptions settings) {
    super(region, settings);
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:5,代码来源:TransactionalMemcachedNaturalIdRegionAccessStrategy.java


示例19: NonStrictReadWriteMemcachedNaturalIdRegionAccessStrategy

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
/**
 * Create a non-strict read/write access strategy accessing the given NaturalId region.
 */
public NonStrictReadWriteMemcachedNaturalIdRegionAccessStrategy(MemcachedNaturalIdRegion region, SessionFactoryOptions settings) {
    super(region, settings);
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:7,代码来源:NonStrictReadWriteMemcachedNaturalIdRegionAccessStrategy.java


示例20: ReadOnlyMemcachedCollectionRegionAccessStrategy

import org.hibernate.boot.spi.SessionFactoryOptions; //导入依赖的package包/类
public ReadOnlyMemcachedCollectionRegionAccessStrategy(MemcachedCollectionRegion aThis, SessionFactoryOptions settings) {
    super(aThis, settings);
}
 
开发者ID:mihaicostin,项目名称:hibernate-l2-memcached,代码行数:4,代码来源:ReadOnlyMemcachedCollectionRegionAccessStrategy.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DefaultMirrorSelector类代码示例发布时间:2022-05-22
下一篇:
Java HandlerChain类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap