Package com.orientechnologies.orient.core.record.impl

Examples of com.orientechnologies.orient.core.record.impl.ODocument.save()


    database.open("admin", "admin");

    ODocument doc = new ODocument(database);
    doc.field("binary", new ORecordBytes(database, "Binary data".getBytes()));

    doc.save();
    rid = doc.getIdentity();

    database.close();
  }
View Full Code Here


      point.setClassName("MapPoint");

      point.field("x", (52.20472d + i / 100d));
      point.field("y", (0.14056d + i / 100d));

      point.save();
    }

    database.close();
  }
View Full Code Here

      doc.field("val4", 255);
      doc.field("val5", "this is the description for a long comic books -" + i);
      doc.field("name", "this is secmask put on top - " + i);
      doc.setClassName("Account");
      doc.setDatabase(database);
      doc.save();
      doc.reset();
      if (i % 100000 == 0) {
        double time = (double) (System.nanoTime() - block) / 1000000;
        System.out.println(i * 100 / ndoc + "%.\t" + time + "\t" + 100000.0d / time + " docs/ms");
        block = System.nanoTime();
View Full Code Here

      for (int i = 0; i < count; i++) {
        doc.reset();
        doc.setClassName("Chunk");
        doc.field("hash", "key" + Integer.toString(i));
        doc.field("binary", new ORecordBytes(database, data));
        doc.save();

        ORID rid = doc.getIdentity();
        if (i % 100 == 0)
          System.out.println("ORID=" + rid);
      }
View Full Code Here

                  + " is visible on the inside of the Amiga 1000 top cover, alongside the signatures of the"
                  + " engineers who worked on it. Jay endured kidney problems for most of his life, according"
                  + " to his wife, and relied on dialysis. His sister donated one of her own. Miner died due"
                  + " to complications from kidney failure at the age of 62, just two months after Commodore"
                  + " declared bankruptcy.");
      document.save();

//      index.indexDocument(document);
    }

    long lap = System.currentTimeMillis();
View Full Code Here

      doc = new ODocument(db).fromJSON(iRequest.content);

      // ASSURE TO MAKE THE RECORD ID INVALID
      ((ORecordId) doc.getIdentity()).clusterPosition = ORID.CLUSTER_POS_INVALID;

      doc.save();

    } finally {
      if (db != null)
        OSharedDocumentDatabase.release(db);
    }
View Full Code Here

    try {
      db = getProfiledDatabaseInstance(iRequest);

      doc.setDatabase(db);
      doc.save();

    } finally {
      if (db != null)
        OSharedDocumentDatabase.release(db);
    }
View Full Code Here

        if (fileDocument.contains("$file")) {
          fileDocument = fileDocument.replace("$file", fileRID.toString());
        }
        ODocument doc = new ODocument(database);
        doc.fromJSON(fileDocument);
        doc.save();
        writer.beginObject("updatedDocument");
        writer.writeAttribute(1, true, "rid", doc.getIdentity().toString());
        writer.endObject();
        writer.endObject();
      } else {
View Full Code Here

    for (int g = 0; g < 1000; g++) {
      ODocument doc = new ODocument(db, "Account");
      doc.fromJSON(json);
      doc.field("nr", g);

      doc.save();
    }
    db.commit();

    Assert.assertEquals(db.countClusterElements("Account"), totalAccounts + 1000);
View Full Code Here

      }
    }

    if (recordUpdated) {
      record.setDirty();
      record.save();
      recordCount++;
    }

    return 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.