Package com.orientechnologies.orient.core.db.document

Examples of com.orientechnologies.orient.core.db.document.ODatabaseDocument.begin()


      db.hide(new ORecordId());
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin(OTransaction.TXTYPE.NOTX);
View Full Code Here


      db.begin();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin(OTransaction.TXTYPE.NOTX);
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.rollback();
View Full Code Here

      db.hide(new ORecordId());
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin(OTransaction.TXTYPE.NOTX);
View Full Code Here

      db.begin();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin(OTransaction.TXTYPE.NOTX);
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.rollback();
View Full Code Here

      db.hide(new ORecordId());
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin(OTransaction.TXTYPE.NOTX);
View Full Code Here

      db.begin();
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.begin(OTransaction.TXTYPE.NOTX);
      Assert.fail();
    } catch (ODatabaseException ex) {
    }
    try {
      db.rollback();
View Full Code Here

    final int passCount = 10;
    final int chunkSize = 1000;
    for (int pass = 0; pass < passCount; pass++) {
      List<ODocument> recordsToDelete = new ArrayList<ODocument>();
      db.begin();
      for (int i = 0; i < chunkSize; i++) {
        ODocument d = new ODocument("MyFruit").field("name", "ABC" + pass + 'K' + i).field("color", "FOO" + pass);
        d.save();
        if (i < chunkSize / 2) {
          recordsToDelete.add(d);
View Full Code Here

      expectedIndexSize += chunkSize;
      Assert.assertEquals(db.getMetadata().getIndexManager().getClassIndex("MyFruit", "MyFruit.color").getSize(),
          expectedIndexSize, "After add");

      // do delete
      db.begin();
      for (final ODocument recordToDelete : recordsToDelete) {
        Assert.assertNotNull(db.delete(recordToDelete));
      }
      db.commit();
View Full Code Here

  @Test(dependsOnMethods = "linkedIndexedProperty")
  public void testLinkedIndexedPropertyInTx() {
    ODatabaseDocument db = new ODatabaseDocumentTx(database.getURL());
    db.open("admin", "admin");

    db.begin();
    ODocument testClassDocument = db.newInstance("TestClass");
    testClassDocument.field("name", "Test Class 2");
    ODocument testLinkClassDocument = new ODocument("TestLinkClass");
    testLinkClassDocument.field("testString", "Test Link Class 2");
    testLinkClassDocument.field("testBoolean", true);
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.