Package org.hibernate.engine.config.spi

Examples of org.hibernate.engine.config.spi.ConfigurationService


  @Override
  public StatisticsImplementor initiateService(
      SessionFactoryImplementor sessionFactory,
      MetadataImplementor metadata,
      ServiceRegistryImplementor registry) {
    ConfigurationService configurationService =  registry.getService( ConfigurationService.class );
    final Object configValue = configurationService.getSetting( STATS_BUILDER, null );
    return initiateServiceInternal( sessionFactory, configValue, registry );
  }
View Full Code Here


    private String defaultCatalogName;

    public OptionsImpl(StandardServiceRegistry serviceRegistry) {
      this.serviceRegistry = serviceRegistry;

      ConfigurationService configService = serviceRegistry.getService( ConfigurationService.class );

      // cache access type
      defaultCacheAccessType = configService.getSetting(
          AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY,
          new ConfigurationService.Converter<AccessType>() {
            @Override
            public AccessType convert(Object value) {
              return AccessType.fromExternalName( value.toString() );
            }
          }
      );

      useNewIdentifierGenerators = configService.getSetting(
          AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS,
          new ConfigurationService.Converter<Boolean>() {
            @Override
            public Boolean convert(Object value) {
              return Boolean.parseBoolean( value.toString() );
            }
          },
          false
      );

      defaultSchemaName = configService.getSetting(
          AvailableSettings.DEFAULT_SCHEMA,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

      defaultCatalogName = configService.getSetting(
          AvailableSettings.DEFAULT_CATALOG,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

            globallyQuotedIdentifiers = configService.getSetting(
                    AvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS,
                    new ConfigurationService.Converter<Boolean>() {
                        @Override
                        public Boolean convert(Object value) {
                            return Boolean.parseBoolean( value.toString() );
View Full Code Here

    private String defaultCatalogName;

    public OptionsImpl(StandardServiceRegistry serviceRegistry) {
      this.serviceRegistry = serviceRegistry;

      ConfigurationService configService = serviceRegistry.getService( ConfigurationService.class );

      // cache access type
      defaultCacheAccessType = configService.getSetting(
          AvailableSettings.DEFAULT_CACHE_CONCURRENCY_STRATEGY,
          new ConfigurationService.Converter<AccessType>() {
            @Override
            public AccessType convert(Object value) {
              return AccessType.fromExternalName( value.toString() );
            }
          }
      );

      useNewIdentifierGenerators = configService.getSetting(
          AvailableSettings.USE_NEW_ID_GENERATOR_MAPPINGS,
          new ConfigurationService.Converter<Boolean>() {
            @Override
            public Boolean convert(Object value) {
              return Boolean.parseBoolean( value.toString() );
            }
          },
          false
      );

      defaultSchemaName = configService.getSetting(
          AvailableSettings.DEFAULT_SCHEMA,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

      defaultCatalogName = configService.getSetting(
          AvailableSettings.DEFAULT_CATALOG,
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
            }
          },
          null
      );

            globallyQuotedIdentifiers = configService.getSetting(
                    AvailableSettings.GLOBALLY_QUOTED_IDENTIFIERS,
                    new ConfigurationService.Converter<Boolean>() {
                        @Override
                        public Boolean convert(Object value) {
                            return Boolean.parseBoolean( value.toString() );
View Full Code Here

  @Override
  public StatisticsImplementor initiateService(
      SessionFactoryImplementor sessionFactory,
      MetadataImplementor metadata,
      ServiceRegistryImplementor registry) {
    ConfigurationService configurationService =  registry.getService( ConfigurationService.class );
    final Object configValue = configurationService.getSetting( STATS_BUILDER, null );
    return initiateServiceInternal( sessionFactory, configValue, registry );
  }
View Full Code Here

  }

  private EntityCopyObserver createEntityCopyObserver(SessionFactoryImplementor sessionFactory) {
    final ServiceRegistry serviceRegistry = sessionFactory.getServiceRegistry();
    if ( entityCopyObserverStrategy == null ) {
      final ConfigurationService configurationService
          = serviceRegistry.getService( ConfigurationService.class );
      entityCopyObserverStrategy = configurationService.getSetting(
          "hibernate.event.merge.entity_copy_observer",
          new ConfigurationService.Converter<String>() {
            @Override
            public String convert(Object value) {
              return value.toString();
View Full Code Here

TOP

Related Classes of org.hibernate.engine.config.spi.ConfigurationService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.