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

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


        // MAKING SURE THAT DATABASE USER IS CURRENT (IN CASE OF DETACHING)
        if (iRecord.getDatabase() != underlying)
          iRecord.setDatabase(underlying);

        if (iRecord.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
          record = (ODocument) record.load();

        pojo = newInstance(record.getClassName());
        registerUserObject(pojo, record);

        stream2pojo(record, pojo, iFetchPlan);
View Full Code Here


      iEvaluatedRecords.add(target.getIdentity());

      if (target.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
        try {
          target.load();
        } catch (final ORecordNotFoundException e) {
          // INVALID RID
          return false;
        }
View Full Code Here

              if (record == null)
                ioResult = null;
              else
                try {
                  if (record.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
                    record.load();

                  ioResult = ioResult != null ? record.rawField(op.value.get(0)) : null;
                } catch (ORecordNotFoundException e) {
                  ioResult = null;
                }
View Full Code Here

      if (rid == null)
        throw new IllegalArgumentException("Record ID not found in request");

      ODocument doc = new ODocument(db, className, new ORecordId(rid));
      doc = (ODocument) doc.load();

      // BIND ALL CHANGED FIELDS
      Object oldValue;
      Object newValue;
      for (Entry<String, String> f : fields.entrySet()) {
View Full Code Here

      if (rid == null)
        throw new IllegalArgumentException("Record ID not found in request");

      final ODocument doc = new ODocument(db, new ORecordId(rid));
      doc.load();
      doc.delete();
      sendTextContent(iRequest, OHttpUtils.STATUS_OK_CODE, "OK", null, OHttpUtils.CONTENT_TEXT_PLAIN, "Record " + rid
          + " deleted successfully.");

    } else
View Full Code Here

  @Test(dependsOnMethods = "testMixedCreate")
  public void testMixedRead() {
    database.open("admin", "admin");

    ODocument doc = new ODocument(database, rid);
    doc.load();

    Assert.assertEquals("Binary data", new String(((ORecordBytes) doc.field("binary")).toStream()));

    database.close();
  }
View Full Code Here

      iEvaluatedRecords.add(target.getIdentity());

      if (target.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
        try {
          target.load();
        } catch (ORecordNotFoundException e) {
          // INVALID RID
          return false;
        }
View Full Code Here

              if (record == null)
                ioResult = null;
              else
                try {
                  if (record.getInternalStatus() == ORecordElement.STATUS.NOT_LOADED)
                    record.load();

                  ioResult = ioResult != null ? record.rawField(op.value.get(0)) : null;
                } catch (ORecordNotFoundException e) {
                  ioResult = null;
                }
View Full Code Here

      iEvaluatedRecords.add(target.getIdentity());

      if (target.getInternalStatus() == STATUS.NOT_LOADED)
        try {
          target.load();
        } catch (ORecordNotFoundException e) {
          // INVALID RID
          return false;
        }
View Full Code Here

              if (record == null)
                ioResult = null;
              else
                try {
                  if (record.getInternalStatus() == STATUS.NOT_LOADED)
                    record.load();

                  ioResult = ioResult != null ? record.field(op.value.get(0)) : null;
                } catch (ORecordNotFoundException e) {
                  ioResult = null;
                }
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.