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

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


        // GET THE CONFIG OF THE NEW SERVER
        clusterConfig = (ODocument) fieldValue;
      else {
        // MERGE CLUSTER CONFIG
        if (fieldValue instanceof ODocument)
          clusterConfig.merge((ODocument) cfgDoc.field(fieldName), true, true);
        else
          clusterConfig.merge((Map<String, Object>) cfgDoc.field(fieldName), true, true);
      }
    }
View Full Code Here


      else {
        // MERGE CLUSTER CONFIG
        if (fieldValue instanceof ODocument)
          clusterConfig.merge((ODocument) cfgDoc.field(fieldName), true, true);
        else
          clusterConfig.merge((Map<String, Object>) cfgDoc.field(fieldName), true, true);
      }
    }

    OLogManager.instance().warn(this, "Updated server node configuration: %s", dbConfiguration.toJSON(""));
View Full Code Here

        if (currentRecord == null)
          throw new ORecordNotFoundException(rid.toString());

        final ODocument doc = (ODocument) currentRecord;
        doc.merge((ODocument) newRecord, false, false);

      } else
        currentRecord = newRecord;

      currentRecord.setVersion(version);
View Full Code Here

    list2.add("Luca");
    list2.add("Michael");
    doc2.field("years", 32);

    ODocument docMerge1 = doc1.copy();
    docMerge1.merge(doc2, true, true);

    Assert.assertTrue(docMerge1.containsField("embeddedList"));
    Assert.assertTrue(docMerge1.field("embeddedList") instanceof List<?>);
    Assert.assertEquals(((List<String>) docMerge1.field("embeddedList")).size(), 4);
    Assert.assertTrue(((List<String>) docMerge1.field("embeddedList")).get(0) instanceof String);
View Full Code Here

    Assert.assertTrue(((List<String>) docMerge1.field("embeddedList")).get(0) instanceof String);
    Assert.assertEquals(((Integer) docMerge1.field("salary")).intValue(), 10000);
    Assert.assertEquals(((Integer) docMerge1.field("years")).intValue(), 32);

    ODocument docMerge2 = doc1.copy();
    docMerge2.merge(doc2, true, false);

    Assert.assertTrue(docMerge2.containsField("embeddedList"));
    Assert.assertTrue(docMerge2.field("embeddedList") instanceof List<?>);
    Assert.assertEquals(((List<String>) docMerge2.field("embeddedList")).size(), 2);
    Assert.assertTrue(((List<String>) docMerge2.field("embeddedList")).get(0) instanceof String);
View Full Code Here

    Assert.assertEquals(((Integer) docMerge2.field("years")).intValue(), 32);

    ODocument docMerge3 = doc1.copy();

    doc2.removeField("years");
    docMerge3.merge(doc2, false, false);

    Assert.assertTrue(docMerge3.containsField("embeddedList"));
    Assert.assertTrue(docMerge3.field("embeddedList") instanceof List<?>);
    Assert.assertEquals(((List<String>) docMerge3.field("embeddedList")).size(), 2);
    Assert.assertTrue(((List<String>) docMerge3.field("embeddedList")).get(0) instanceof String);
View Full Code Here

        // GET THE CONFIG OF THE NEW SERVER
        clusterConfig = (ODocument) fieldValue;
      else {
        // MERGE CLUSTER CONFIG
        if (fieldValue instanceof ODocument)
          clusterConfig.merge((ODocument) cfgDoc.field(fieldName), true, true);
        else
          clusterConfig.merge((Map<String, Object>) cfgDoc.field(fieldName), true, true);
      }
    }
View Full Code Here

      else {
        // MERGE CLUSTER CONFIG
        if (fieldValue instanceof ODocument)
          clusterConfig.merge((ODocument) cfgDoc.field(fieldName), true, true);
        else
          clusterConfig.merge((Map<String, Object>) cfgDoc.field(fieldName), true, true);
      }
    }

    OLogManager.instance().info(this, "Updated server node configuration: %s", dbConfiguration.toJSON(""));
View Full Code Here

        if (currentRecord == null)
          throw new ORecordNotFoundException(rid.toString());

        final ODocument doc = (ODocument) currentRecord;
        doc.merge((ODocument) newRecord, false, false);

      } else
        currentRecord = newRecord;

      currentRecord.setVersion(version);
View Full Code Here

        // GET THE CONFIG OF THE NEW SERVER
        clusterConfig = (ODocument) fieldValue;
      else {
        // MERGE CLUSTER CONFIG
        if (fieldValue instanceof ODocument)
          clusterConfig.merge((ODocument) cfgDoc.field(fieldName), true, true);
        else
          clusterConfig.merge((Map<String, Object>) cfgDoc.field(fieldName), true, 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.