Examples of field()


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

    ODocument d = ((Map<String, ODocument>) loadedDoc.field("map")).get("Luca");
    Assert.assertEquals(d.field("name"), "Luca");

    d = ((Map<String, ODocument>) loadedDoc.field("map")).get("Marcus");
    Assert.assertEquals(d.field("name"), "Marcus");

    d = ((Map<String, ODocument>) loadedDoc.field("map")).get("Cesare");
    Assert.assertEquals(d.field("name"), "Cesare");
  }
View Full Code Here

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

    d = ((Map<String, ODocument>) loadedDoc.field("map")).get("Marcus");
    Assert.assertEquals(d.field("name"), "Marcus");

    d = ((Map<String, ODocument>) loadedDoc.field("map")).get("Cesare");
    Assert.assertEquals(d.field("name"), "Cesare");
  }

  @Test
  public void testMerge() {
    ODocument doc1 = new ODocument();
View Full Code Here

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

  @Test
  public void testMerge() {
    ODocument doc1 = new ODocument();
    final ArrayList<String> list = new ArrayList<String>();
    doc1.field("embeddedList", list, OType.EMBEDDEDLIST);
    list.add("Luca");
    list.add("Marcus");
    list.add("Jay");
    doc1.field("salary", 10000);
    doc1.field("years", 16);
View Full Code Here

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

    final ArrayList<String> list = new ArrayList<String>();
    doc1.field("embeddedList", list, OType.EMBEDDEDLIST);
    list.add("Luca");
    list.add("Marcus");
    list.add("Jay");
    doc1.field("salary", 10000);
    doc1.field("years", 16);

    ODocument doc2 = new ODocument();
    final ArrayList<String> list2 = new ArrayList<String>();
    doc2.field("embeddedList", list2, OType.EMBEDDEDLIST);
View Full Code Here

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

    doc1.field("embeddedList", list, OType.EMBEDDEDLIST);
    list.add("Luca");
    list.add("Marcus");
    list.add("Jay");
    doc1.field("salary", 10000);
    doc1.field("years", 16);

    ODocument doc2 = new ODocument();
    final ArrayList<String> list2 = new ArrayList<String>();
    doc2.field("embeddedList", list2, OType.EMBEDDEDLIST);
    list2.add("Luca");
View Full Code Here

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

    doc1.field("salary", 10000);
    doc1.field("years", 16);

    ODocument doc2 = new ODocument();
    final ArrayList<String> list2 = new ArrayList<String>();
    doc2.field("embeddedList", list2, OType.EMBEDDEDLIST);
    list2.add("Luca");
    list2.add("Michael");
    doc2.field("years", 32);

    ODocument docMerge1 = doc1.copy();
View Full Code Here

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

    ODocument doc2 = new ODocument();
    final ArrayList<String> list2 = new ArrayList<String>();
    doc2.field("embeddedList", list2, OType.EMBEDDEDLIST);
    list2.add("Luca");
    list2.add("Michael");
    doc2.field("years", 32);

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

    Assert.assertTrue(docMerge1.containsField("embeddedList"));
View Full Code Here

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

    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);
    Assert.assertEquals(((Integer) docMerge1.field("salary")).intValue(), 10000);
    Assert.assertEquals(((Integer) docMerge1.field("years")).intValue(), 32);
View Full Code Here

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

    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);
    Assert.assertEquals(((Integer) docMerge1.field("salary")).intValue(), 10000);
    Assert.assertEquals(((Integer) docMerge1.field("years")).intValue(), 32);

    ODocument docMerge2 = doc1.copy();
View Full Code Here

Examples of com.sissi.ucenter.relation.muc.room.RoomConfigParser.field()

    public Room push(Fields fields) {
      BasicDBObjectBuilder update = BasicDBObjectBuilder.start();
      for (Field<?> field : fields) {
        RoomConfigParser parser = MongoRoomBuilder.this.parsers.get(field.getName());
        if (parser != null) {
          update.add(Dictionary.FIELD_CONFIGS + "." + parser.field(), parser.parse(field));
        }
      }
      if (!update.isEmpty()) {
        MongoRoomBuilder.this.config.collection().update(this.build(), BasicDBObjectBuilder.start("$set", update.get()).get());
      }
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.