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

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


    StringBuilder text = new StringBuilder();
    Random random = new Random(1000);

    for (int i = 0; i < TOT; ++i) {
      doc.reset();
      doc.setClassName("Whiz");
      doc.field("id", i);
      doc.field("date", new Date());

      text.setLength(0);
View Full Code Here


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

    ODocument point = new ODocument(database);

    for (int i = 0; i < 10000; ++i) {
      point.reset();
      point.setClassName("MapPoint");

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

    listener.onMessage("\nDelete temporary records...");

    final ORecordId rid = new ORecordId();
    final ODocument doc = new ODocument(database, rid);
    for (String recId : recordToDelete) {
      doc.reset();
      rid.fromString(recId);
      doc.delete();
    }
    listener.onMessage("OK (" + recordToDelete.size() + " records)");
  }
View Full Code Here

        // CREATE HOLES
        int holes = (int) (record.getIdentity().getClusterPosition() - nextAvailablePos);

        ODocument tempRecord = new ODocument(database);
        for (int i = 0; i < holes; ++i) {
          tempRecord.reset();
          ((ODatabaseRecord) database.getUnderlying()).save(tempRecord, clusterName);
          recordToDelete.add(tempRecord.getIdentity().toString());
        }
      }
View Full Code Here

      }

      ODocument doc = new ODocument(database, "Chunk");

      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();
View Full Code Here

    long time = System.currentTimeMillis();

    final ODocument document = new ODocument(database, "Employee");
    for (int i = 0; i < DOCUMENTS; ++i) {
      document.reset();
      document.field("name", "Jay");
      document.field("surname", "Miner");
      document
          .field("description",
              "Jay Glenn Miner (May 31, 1932 -  June 20, 1994), was a famous integrated circuit designer, known primarily for his "
View Full Code Here

      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

      }
    }

    synchronized (clusterConfiguration) {

      clusterConfiguration.reset();

      // UPDATE IT
      clusterConfiguration.fromStream(iContent);

      if (OLogManager.instance().isInfoEnabled())
View Full Code Here

      }
    }

    synchronized (clusterConfiguration) {

      clusterConfiguration.reset();

      // UPDATE IT
      clusterConfiguration.fromStream(iContent);

      if (OLogManager.instance().isInfoEnabled())
View Full Code Here

    database.getMetadata().getIndexManager().load();

    ODocument point = new ODocument(database);

    for (int i = 0; i < 10000; ++i) {
      point.reset();
      point.setClassName("MapPoint");

      point.field("x", (52.20472d + i / 100d));
      point.field("y", (0.14056d + i / 100d));
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.