Examples of ODatabaseObjectTx


Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

  @Parameters(value = "url")
  public CRUDObjectInheritanceTest(String iURL) {
    Orient.instance().registerEngine(new OEngineRemote());

    database = new ODatabaseObjectTx(iURL);
    database.getEntityManager().registerEntityClasses("com.orientechnologies.orient.test.domain");
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

  public ObjectTreeTest(String iURL) {
    Orient.instance().registerEngine(new OEngineRemote());

    url = iURL;

    database = new ODatabaseObjectTx(iURL);
    database.getEntityManager().registerEntityClasses("com.orientechnologies.orient.test.domain");
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

  public void testDbCreationNoSecurity() throws IOException {
    if (url.startsWith(OEngineMemory.NAME))
      OGlobalConfiguration.STORAGE_KEEP_OPEN.setValue(true);

    if (!url.startsWith(OEngineRemote.NAME)) {
      database = new ODatabaseObjectTx(url);
      database.setProperty("security", Boolean.FALSE);
      TestUtils.createDatabase(database, url);
      TestUtils.deleteDatabase(database);
    }
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

  @Test(dependsOnMethods = { "testDbCreationNoSecurity" })
  public void testDbCreationDefault() throws IOException {
    if (url.startsWith(OEngineMemory.NAME))
      OGlobalConfiguration.STORAGE_KEEP_OPEN.setValue(true);

    TestUtils.createDatabase(new ODatabaseObjectTx(url), url);
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

    Assert.assertTrue(TestUtils.existsDatabase(new ODatabaseDocumentTx(url)));
  }

  @Test(dependsOnMethods = { "testDbExists" })
  public void testDbOpen() {
    database = new ODatabaseObjectTx(url);
    database.open("admin", "admin");
    database.close();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

    database.close();
  }

  @Test(dependsOnMethods = { "testDbOpen" })
  public void testDbOpenWithLastAsSlash() {
    database = new ODatabaseObjectTx(url + "/");
    database.open("admin", "admin");
    database.close();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

    database.close();
  }

  @Test(dependsOnMethods = { "testDbOpenWithLastAsSlash" })
  public void testDbOpenWithBackSlash() {
    database = new ODatabaseObjectTx(url.replace('/', '\\'));
    database.open("admin", "admin");
    database.close();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

    database.close();
  }

  @Test(dependsOnMethods = { "testDbOpenWithBackSlash" })
  public void testChangeLocale() throws IOException {
    database = new ODatabaseObjectTx(url);
    database.open("admin", "admin");
    database.getStorage().getConfiguration().localeLanguage = Locale.ENGLISH.getLanguage();
    database.getStorage().getConfiguration().localeCountry = Locale.ENGLISH.getCountry();
    database.getStorage().getConfiguration().update();
    database.close();
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

    database.close();
  }

  @Test(dependsOnMethods = { "testChangeLocale" })
  public void testRoles() throws IOException {
    database = new ODatabaseObjectTx(url);
    database.open("admin", "admin");
    database.query(new OSQLSynchQuery<ORole>("select from ORole where name = 'admin'"));
    database.close();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.object.ODatabaseObjectTx

    database.close();
  }

  @Test
  public void queryProjectionObjectLevel() {
    ODatabaseObjectTx db = new ODatabaseObjectTx(url);
    db.open("admin", "admin");

    List<ODocument> result = db.query(new OSQLSynchQuery<ODocument>(" select nick, followings, followers from Profile "));

    Assert.assertTrue(result.size() != 0);

    for (ODocument d : result) {
      Assert.assertNull(d.getClassName());
      Assert.assertEquals(d.getRecordType(), ODocument.RECORD_TYPE);
    }

    db.close();
  }
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.