Examples of ODatabaseObjectTx


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

  private FlushModeType      flushMode  = FlushModeType.AUTO;
  private EntityTransaction  transaction;

  public OJPAEntityManager(final Map<?, ?> map) {
    final String url = (String) map.get("url");
    database = new ODatabaseObjectTx(url);
    transaction = new OJPAEntityTransaction(database);
  }
View Full Code Here

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

  @Parameters(value = "url")
  public IndexTest(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

    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

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

  @Parameters(value = "url")
  public ObjectTreeTest(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

    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

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

  @Test
  public void testFetchedJson() {
    Orient.instance().registerEngine(new OEngineRemote());

    ODatabaseObjectTx database = new ODatabaseObjectTx(url);
    database.open("admin", "admin");
    database.getEntityManager().registerEntityClasses("com.orientechnologies.orient.test.domain");

    List<ODocument> result = database.getUnderlying()
        .command(new OSQLSynchQuery<ODocument>("select * from Profile where name = 'Barack' and surname = 'Obama'")).execute();
    int i = 0;
    for (ODocument doc : result) {
      String jsonFull = doc.toJSON("type,rid,version,class,attribSameRow,indent:0,fetchPlan:*:-1");
      ODocument loadedDoc = new ODocument().fromJSON(jsonFull);
View Full Code Here

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

  public void testDbCreation() 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 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
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.