Package org.hivedb.hibernate

Examples of org.hivedb.hibernate.ConfigurationReader


  @Before
  public void beforeMethod() throws Exception {
    dialect = getDialect();
    hive = new YamlHiveCreator(dialect).load(getHiveConfigurationFile());
    configurationReader = new ConfigurationReader(getMappedClasses());
    configurationReader.install(hive);
    config = getEntityHiveConfig();
    setup();
  }
View Full Code Here


// TODO remove
public class TerraformingHiveFactory {
  public static Hive colonize(String uri, List<Class<?>> persistedClasses) {
    new HiveConfigurationSchemaInstaller(uri).run();
    ConfigurationReader reader = new ConfigurationReader(persistedClasses);
    reader.install(uri);
    return Hive.load(uri, CachingDataSourceProvider.getInstance());
  }
View Full Code Here

  public SingletonHiveSessionFactoryBuilder(Hive hive, List<Class<?>> persistableClasses, ShardAccessStrategy accessStrategy, Properties overrides) {
    this.hive = hive;
    this.persistableClasses = persistableClasses;
    this.overrides = overrides;
    this.accessStrategy = accessStrategy;
    this.hiveConfig = new ConfigurationReader(this.persistableClasses).getHiveConfiguration();
  }
View Full Code Here

  }

  @Test
  public void testOnSaveInsertReadOnlyFailure() throws Exception {
    Hive hive = getHive();
    ConfigurationReader reader = new ConfigurationReader(Continent.class, WeatherReport.class);
    EntityHiveConfig config = reader.getHiveConfiguration();
    HiveInterceptorDecorator interceptor = new HiveInterceptorDecorator(config, hive);

    WeatherReport report = generateInstance();
    hive.directory().insertPrimaryIndexKey(report.getContinent());
    hive.updateHiveStatus(Lockable.Status.readOnly);
View Full Code Here

  }

  @Test
  public void testOnDelete() throws Exception{
    Hive hive = getHive();
    ConfigurationReader reader = new ConfigurationReader(Continent.class, WeatherReport.class);
    EntityHiveConfig config = reader.getHiveConfiguration();
    HiveInterceptorDecorator interceptor = new HiveInterceptorDecorator(config, hive);

    WeatherReport report = generateInstance();
    Continent asia = new AsiaticContinent();
    hive.directory().insertPrimaryIndexKey(report.getContinent());
View Full Code Here

  }

  @Test
  public void fullyInstalledHive() throws Exception {
    new HiveConfigurationSchemaInstaller(getConnectString(HIVE)).run();
    new ConfigurationReader(getPersistedClasses()).install(getConnectString(HIVE));
    barrenHiveDb();
  }
View Full Code Here

TOP

Related Classes of org.hivedb.hibernate.ConfigurationReader

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.