Package org.hibernate.cfg

Examples of org.hibernate.cfg.SettingsFactory


    this.properties = createPropertiesFromMap(
        metadata.getServiceRegistry().getService( ConfigurationService.class ).getSettings()
    );

    // TODO: these should be moved into SessionFactoryOptions
    this.settings = new SettingsFactory().buildSettings(
        properties,
        metadata.getServiceRegistry()
    );

    this.serviceRegistry =
View Full Code Here


    this.properties = createPropertiesFromMap(
        metadata.getServiceRegistry().getService( ConfigurationService.class ).getSettings()
    );

    // TODO: these should be moved into SessionFactoryOptions
    this.settings = new SettingsFactory().buildSettings(
        properties,
        metadata.getServiceRegistry()
    );

    this.serviceRegistry =
View Full Code Here

    this.properties = createPropertiesFromMap(
        metadata.getServiceRegistry().getService( ConfigurationService.class ).getSettings()
    );

    // TODO: these should be moved into SessionFactoryOptions
    this.settings = new SettingsFactory().buildSettings(
        properties,
        metadata.getServiceRegistry()
    );

    this.serviceRegistry =
View Full Code Here

    this.properties = createPropertiesFromMap(
        metadata.getServiceRegistry().getService( ConfigurationService.class ).getSettings()
    );

    // TODO: these should be moved into SessionFactoryOptions
    this.settings = new SettingsFactory().buildSettings(
        properties,
        metadata.getServiceRegistry()
    );

    this.serviceRegistry =
View Full Code Here

    this.properties = createPropertiesFromMap(
        metadata.getServiceRegistry().getService( ConfigurationService.class ).getSettings()
    );

    // TODO: these should be moved into SessionFactoryOptions
    this.settings = new SettingsFactory().buildSettings(
        properties,
        metadata.getServiceRegistry()
    );

    this.serviceRegistry =
View Full Code Here

          {
              ClassPathXmlApplicationContext newContext = new SmartClassPathXmlApplicationContext(emfContextLocation);
              try {
                // get a reference to the factory bean, don't have it create a new EntityManager
                  LocalContainerEntityManagerFactoryBean factoryBean = newContext.getBean("&" + emfContextBeanName, LocalContainerEntityManagerFactoryBean.class);
                  SettingsFactory settingsFactory = new InjectedDataSourceSettingsFactory(factoryBean.getDataSource());
                  settings = settingsFactory.buildSettings(new Properties());
              }
              finally {
                newContext.close();
              }
          }
View Full Code Here

    this.properties = createPropertiesFromMap(
        metadata.getServiceRegistry().getService( ConfigurationService.class ).getSettings()
    );

    // TODO: these should be moved into SessionFactoryOptions
    this.settings = new SettingsFactory().buildSettings(
        properties,
        metadata.getServiceRegistry()
    );

    this.serviceRegistry =
View Full Code Here

      StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
      //builder.configure();
      builder.applySettings(Environment.getProperties());
      ServiceRegistry serviceRegistry = builder.build();
     
      settings = new SettingsFactory() {
        // trick to get hibernate.properties settings for defaultschema/catalog in here
      }.buildSettings(Environment.getProperties(), serviceRegistry);
    }
    //return new OverrideRepository(settings.getDefaultCatalogName(),settings.getDefaultSchemaName());
    return new OverrideRepository();
View Full Code Here

 
  private OverrideRepository buildOverrideRepository() {
    if(settings==null) {
      StandardServiceRegistryBuilder builder = new StandardServiceRegistryBuilder();
      ServiceRegistry serviceRegistry = builder.build();
      settings = new SettingsFactory() {
        // trick to get hibernate.properties settings for defaultschema/catalog in here
      }.buildSettings(Environment.getProperties(), serviceRegistry);
    }
    //return new OverrideRepository(settings.getDefaultCatalogName(),settings.getDefaultSchemaName());
    return new OverrideRepository();
View Full Code Here

    this.properties = createPropertiesFromMap(
        metadata.getServiceRegistry().getService( ConfigurationService.class ).getSettings()
    );

    // TODO: these should be moved into SessionFactoryOptions
    this.settings = new SettingsFactory().buildSettings(
        properties,
        metadata.getServiceRegistry()
    );

    this.serviceRegistry =
View Full Code Here

TOP

Related Classes of org.hibernate.cfg.SettingsFactory

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.