Package org.hibernate.cfg

Examples of org.hibernate.cfg.Settings


    private List<SessionEventListener> listeners;

    SessionBuilderImpl(SessionFactoryImpl sessionFactory) {
      this.sessionFactory = sessionFactory;
      this.sessionOwner = null;
      final Settings settings = sessionFactory.settings;

      // set up default builder values...
      this.interceptor = sessionFactory.getInterceptor();
      this.connectionReleaseMode = settings.getConnectionReleaseMode();
      this.autoClose = settings.isAutoCloseSessionEnabled();
      this.flushBeforeCompletion = settings.isFlushBeforeCompletionEnabled();

      if ( sessionFactory.getCurrentTenantIdentifierResolver() != null ) {
        tenantIdentifier = sessionFactory.getCurrentTenantIdentifierResolver().resolveCurrentTenantIdentifier();
      }

      listeners = settings.getBaselineSessionEventsListenerBuilder().buildBaselineList();
    }
View Full Code Here


    private String tenantIdentifier;

    SessionBuilderImpl(SessionFactoryImpl sessionFactory) {
      this.sessionFactory = sessionFactory;
      this.sessionOwner = null;
      final Settings settings = sessionFactory.settings;

      // set up default builder values...
      this.interceptor = sessionFactory.getInterceptor();
      this.connectionReleaseMode = settings.getConnectionReleaseMode();
      this.autoClose = settings.isAutoCloseSessionEnabled();
      this.flushBeforeCompletion = settings.isFlushBeforeCompletionEnabled();

      if ( sessionFactory.getCurrentTenantIdentifierResolver() != null ) {
        tenantIdentifier = sessionFactory.getCurrentTenantIdentifierResolver().resolveCurrentTenantIdentifier();
      }
    }
View Full Code Here

        StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
    builder.applySettings(cfg.getProperties());
    ServiceRegistry serviceRegistry = builder.build();
    JdbcServices jdbcServices = serviceRegistry.getService(JdbcServices.class);
    Settings settings = cfg.buildSettings(serviceRegistry);
   
        dialect = jdbcServices.getDialect(); // TODO: get it from somewhere "cached".

        String defaultCatalog = settings.getDefaultCatalogName();

        String defaultSchema = settings.getDefaultSchemaName();     
       

        if (defaultSchema == null) {
            defaultSchema = DEFAULT_NO_SCHEMA_NAME;
        }
View Full Code Here

    private boolean flushBeforeCompletion;
    private String tenantIdentifier;

    SessionBuilderImpl(SessionFactoryImpl sessionFactory) {
      this.sessionFactory = sessionFactory;
      final Settings settings = sessionFactory.settings;

      // set up default builder values...
      this.interceptor = sessionFactory.getInterceptor();
      this.connectionReleaseMode = settings.getConnectionReleaseMode();
      this.autoClose = settings.isAutoCloseSessionEnabled();
      this.flushBeforeCompletion = settings.isFlushBeforeCompletionEnabled();
    }
View Full Code Here

  public void analyze(Configuration cfg) {
   
    StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
    builder.applySettings(cfg.getProperties());
    ServiceRegistry serviceRegistry = builder.build();
    Settings settings = cfg.buildSettings(serviceRegistry);
   
    for (int i = 0; i < detectors.length; i++) {
      detectors[i].initialize( cfg, settings );
      detectors[i].visit(cfg, this);
    }
View Full Code Here

    private boolean flushBeforeCompletion;
    private String tenantIdentifier;

    SessionBuilderImpl(SessionFactoryImpl sessionFactory) {
      this.sessionFactory = sessionFactory;
      final Settings settings = sessionFactory.settings;

      // set up default builder values...
      this.interceptor = sessionFactory.getInterceptor();
      this.connectionReleaseMode = settings.getConnectionReleaseMode();
      this.autoClose = settings.isAutoCloseSessionEnabled();
      this.flushBeforeCompletion = settings.isFlushBeforeCompletionEnabled();
    }
View Full Code Here

TOP

Related Classes of org.hibernate.cfg.Settings

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.