Package org.hivedb

Examples of org.hivedb.Hive.directory()


    WeatherReport report = generateInstance();
    hive.directory().insertPrimaryIndexKey(report.getContinent());
    interceptor.postFlush(Arrays.asList(new WeatherReport[]{report}).iterator());

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    hive.updateHiveStatus(Status.readOnly);
    try {
      interceptor.onDelete(report, null, null, null, null);
View Full Code Here


    hive.directory().insertPrimaryIndexKey(report.getContinent());
    interceptor.postFlush(Arrays.asList(new WeatherReport[]{report}).iterator());

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    hive.updateHiveStatus(Status.readOnly);
    try {
      interceptor.onDelete(report, null, null, null, null);
      fail("No exception thrown");
View Full Code Here

    EntityHiveConfig config = reader.getHiveConfiguration();
    HiveInterceptorDecorator interceptor = new HiveInterceptorDecorator(config, hive);

    WeatherReport report = generateInstance();
    Continent asia = new AsiaticContinent();
    hive.directory().insertPrimaryIndexKey(report.getContinent());
    hive.directory().insertPrimaryIndexKey(asia.getName());
    interceptor.postFlush(Arrays.asList(new Object[]{report, asia}).iterator());

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
View Full Code Here

    HiveInterceptorDecorator interceptor = new HiveInterceptorDecorator(config, hive);

    WeatherReport report = generateInstance();
    Continent asia = new AsiaticContinent();
    hive.directory().insertPrimaryIndexKey(report.getContinent());
    hive.directory().insertPrimaryIndexKey(asia.getName());
    interceptor.postFlush(Arrays.asList(new Object[]{report, asia}).iterator());

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));
View Full Code Here

    Continent asia = new AsiaticContinent();
    hive.directory().insertPrimaryIndexKey(report.getContinent());
    hive.directory().insertPrimaryIndexKey(asia.getName());
    interceptor.postFlush(Arrays.asList(new Object[]{report, asia}).iterator());

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(asia.getName()));
    assertTrue(hive.directory().doesSecondaryIndexKeyExist("Continent", "population", asia.getPopulation(), asia.getName()));
View Full Code Here

    hive.directory().insertPrimaryIndexKey(report.getContinent());
    hive.directory().insertPrimaryIndexKey(asia.getName());
    interceptor.postFlush(Arrays.asList(new Object[]{report, asia}).iterator());

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(asia.getName()));
    assertTrue(hive.directory().doesSecondaryIndexKeyExist("Continent", "population", asia.getPopulation(), asia.getName()));
View Full Code Here

    hive.directory().insertPrimaryIndexKey(asia.getName());
    interceptor.postFlush(Arrays.asList(new Object[]{report, asia}).iterator());

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(asia.getName()));
    assertTrue(hive.directory().doesSecondaryIndexKeyExist("Continent", "population", asia.getPopulation(), asia.getName()));

    interceptor.onDelete(report, null, null, null, null);
View Full Code Here

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(asia.getName()));
    assertTrue(hive.directory().doesSecondaryIndexKeyExist("Continent", "population", asia.getPopulation(), asia.getName()));

    interceptor.onDelete(report, null, null, null, null);
    interceptor.onDelete(asia, null, null, null, null);
View Full Code Here

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(report.getContinent()));
    assertTrue(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    assertTrue(hive.directory().doesPrimaryIndexKeyExist(asia.getName()));
    assertTrue(hive.directory().doesSecondaryIndexKeyExist("Continent", "population", asia.getPopulation(), asia.getName()));

    interceptor.onDelete(report, null, null, null, null);
    interceptor.onDelete(asia, null, null, null, null);

    assertFalse(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
View Full Code Here

    assertTrue(hive.directory().doesSecondaryIndexKeyExist("Continent", "population", asia.getPopulation(), asia.getName()));

    interceptor.onDelete(report, null, null, null, null);
    interceptor.onDelete(asia, null, null, null, null);

    assertFalse(hive.directory().doesResourceIdExist("WeatherReport", report.getReportId()));
    // Referenced entity does not get deleted
    assertTrue(hive.directory().doesResourceIdExist("Temperature", report.getTemperature()));

    assertFalse(hive.directory().doesPrimaryIndexKeyExist(asia.getName()));
    assertFalse(hive.directory().doesSecondaryIndexKeyExist("Continent", "population", asia.getPopulation(), asia.getName()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.