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

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


    String dateAsString = database.getStorage().getConfiguration().getDateFormatInstance().format(begin);

    ODocument doc = new ODocument(database, "Order");
    doc.field("context", "testPrecision");
    doc.field("date", new Date(), OType.DATE);
    doc.save();

    List<ODocument> result = database.command(
        new OSQLSynchQuery<ODocument>("select * from Order where date >= ? and context = 'testPrecision'")).execute(dateAsString);

    Assert.assertEquals(result.size(), 1);
View Full Code Here


      ODocument doc = className != null ? new ODocument(database, className) : new ODocument(database);

      OSQLHelper.bindParameters(doc, fields, iArgs);

      if (clusterName != null)
        doc.save(clusterName);
      else
        doc.save();
      return doc;
    }
  }
View Full Code Here

      OSQLHelper.bindParameters(doc, fields, iArgs);

      if (clusterName != null)
        doc.save(clusterName);
      else
        doc.save();
      return doc;
    }
  }
}
View Full Code Here

                }
                coll.add(doc);
              } else {
                target.field(linkName, doc);
              }
              target.save();

            } else {
              // SET THE REFERENCE
              doc.field(linkName, value);
              doc.save();
View Full Code Here

    docs = targetVertex.field(OGraphDatabase.VERTEX_FIELD_IN);
    if (docs != null)
      docs.remove(iEdge);

    targetVertex.setDirty();
    targetVertex.save();

    if (iDatabase.existsUserObjectByRID(iEdge.getIdentity())) {
      final OGraphEdge edge = (OGraphEdge) iDatabase.getUserObjectByRecord(iEdge, null);
      iDatabase.unregisterPojo(edge, iEdge);
    }
View Full Code Here

      }
    }

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

    return true;
  }
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

    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

    ((HashSet<ODocument>) jack.field("following", new HashSet<ODocument>()).field("following")).add(kim);
    ((HashSet<ODocument>) kim.field("following", new HashSet<ODocument>()).field("following")).add(teri);
    ((HashSet<ODocument>) teri.field("following", new HashSet<ODocument>()).field("following")).add(jack);

    jack.save();

    db.commit();

    db.close();
    db.open("admin", "admin");
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

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.