Examples of field()


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

      if (subSet != null) {
        for (Entry<Object, Set<OIdentifiable>> v : subSet.entrySet()) {
          for (OIdentifiable id : v.getValue()) {
            final ODocument document = new ODocument();
            document.field("key", v.getKey());
            document.field("rid", id.getIdentity());
            document.unsetDirty();
            result.add(document);
          }
        }
      }
View Full Code Here

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

    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);
      for (int w = 0; w < 10; ++w) {
        if (w > 0)
View Full Code Here

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

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

      text.setLength(0);
      for (int w = 0; w < 10; ++w) {
        if (w > 0)
          text.append(' ');
View Full Code Here

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

      final ONavigableMap<Object, Set<OIdentifiable>> subSet = map.subMap(iRangeFrom, iInclusive, iRangeTo, iInclusive);
      if (subSet != null) {
        for (Entry<Object, Set<OIdentifiable>> v : subSet.entrySet()) {
          for (OIdentifiable id : v.getValue()) {
            final ODocument document = new ODocument();
            document.field("key", v.getKey());
            document.field("rid", id.getIdentity());
            document.unsetDirty();
            result.add(document);
          }
        }
View Full Code Here

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

        if (w > 0)
          text.append(' ');
        text.append(words[random.nextInt(words.length - 1)]);
      }

      doc.field("text", text.toString());

      doc.save();
    }

    database.close();
View Full Code Here

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

      if (subSet != null) {
        for (Entry<Object, Set<OIdentifiable>> v : subSet.entrySet()) {
          for (OIdentifiable id : v.getValue()) {
            final ODocument document = new ODocument();
            document.field("key", v.getKey());
            document.field("rid", id.getIdentity());
            document.unsetDirty();
            result.add(document);
          }
        }
      }
View Full Code Here

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

    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));

      point.save();
    }
View Full Code Here

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

    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));

      point.save();
    }

    database.close();
View Full Code Here

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

  @Test
  public void testEmbeddedList() {
    ODocument newDoc = new ODocument();

    final ArrayList<ODocument> list = new ArrayList<ODocument>();
    newDoc.field("embeddedList", list, OType.EMBEDDEDLIST);
    list.add(new ODocument().field("name", "Luca"));
    list.add(new ODocument().field("name", "Marcus"));

    String json = newDoc.toJSON();
    ODocument loadedDoc = new ODocument().fromJSON(json);
View Full Code Here

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

    ODocument loadedDoc = new ODocument().fromJSON(json);

    Assert.assertTrue(newDoc.hasSameContentOf(loadedDoc));

    Assert.assertTrue(loadedDoc.containsField("embeddedList"));
    Assert.assertTrue(loadedDoc.field("embeddedList") instanceof List<?>);
    Assert.assertTrue(((List<ODocument>) loadedDoc.field("embeddedList")).get(0) instanceof ODocument);

    ODocument d = ((List<ODocument>) loadedDoc.field("embeddedList")).get(0);
    Assert.assertEquals(d.field("name"), "Luca");
    d = ((List<ODocument>) loadedDoc.field("embeddedList")).get(1);
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.