Examples of containsField()


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

    final ORecordLazySet result = new ORecordLazySet(underlying);
    if (iEdges != null)
      for (OIdentifiable item : iEdges) {
        final ODocument doc = (ODocument) item;
        for (String propName : iPropertyNames) {
          if (doc.containsField(propName))
            // FOUND: ADD IT
            result.add(item);
        }
      }
View Full Code Here

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

    // BIND VALUES TO ADD
    Collection<Object> coll;
    Object fieldValue;
    for (Map.Entry<String, Object> entry : addEntries.entrySet()) {
      coll = null;
      if (!record.containsField(entry.getKey())) {
        // GET THE TYPE IF ANY
        if (record.getSchemaClass() != null) {
          OProperty prop = record.getSchemaClass().getProperty(entry.getKey());
          if (prop != null && prop.getType() == OType.LINKSET)
            // SET TYPE
View Full Code Here

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

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");

    ODocument loadedDoc = database.load(rid);
    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");
View Full Code Here

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

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");

    ODocument loadedDoc = database.load(rid);
    Assert.assertTrue(loadedDoc.containsField("linkedList"));
    Assert.assertTrue(loadedDoc.field("linkedList") instanceof List<?>);
    Assert.assertTrue(((List<ODocument>) loadedDoc.field("linkedList")).get(0) instanceof ODocument);

    ODocument d = ((List<ODocument>) loadedDoc.field("linkedList")).get(0);
    Assert.assertTrue(d.getIdentity().isValid());
View Full Code Here

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

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");

    ODocument loadedDoc = database.load(rid);
    Assert.assertTrue(loadedDoc.containsField("embeddedSet"));
    Assert.assertTrue(loadedDoc.field("embeddedSet", Set.class) instanceof Set<?>);

    final Iterator<ODocument> it = ((Collection<ODocument>) loadedDoc.field("embeddedSet")).iterator();

    int tot = 0;
View Full Code Here

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

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");

    ODocument loadedDoc = database.load(rid);
    Assert.assertTrue(loadedDoc.containsField("linkedSet"));
    Assert.assertTrue(loadedDoc.field("linkedSet", Set.class) instanceof Set<?>);

    final Iterator<ODocument> it = ((Collection<ODocument>) loadedDoc.field("linkedSet")).iterator();

    int tot = 0;
View Full Code Here

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

    database.close();

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");

    ODocument loadedDoc = database.load(rid);
    Assert.assertTrue(loadedDoc.containsField("embeddedMap"));
    Assert.assertTrue(loadedDoc.field("embeddedMap") instanceof Map<?, ?>);
    Assert.assertTrue(((Map<String, ODocument>) loadedDoc.field("embeddedMap")).values().iterator().next() instanceof ODocument);

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

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

    database = ODatabaseDocumentPool.global().acquire(url, "admin", "admin");

    ODocument loadedDoc = database.load(rid);

    Assert.assertTrue(loadedDoc.containsField("embeddedMap"));
    Assert.assertTrue(loadedDoc.field("embeddedMap") instanceof Map<?, ?>);

    final Map<String, ODocument> loadedMap = loadedDoc.field("embeddedMap");
    Assert.assertEquals(loadedMap.size(), 0);
View Full Code Here

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

    final ODocument loadedDoc = database.load(rid);

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

    Assert.assertTrue(loadedDoc.containsField("map1"));
    Assert.assertTrue(loadedDoc.field("map1") instanceof Map<?, ?>);
    final Map<String, ODocument> loadedMap1 = loadedDoc.field("map1");
    Assert.assertEquals(loadedMap1.size(), 1);

    Assert.assertTrue(loadedMap1.containsKey("map2"));
View Full Code Here

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

    final ODocument database = clusterDbConfigurations.get(iDatabaseName);
    if (database == null)
      return null;

    final ODocument clusters = database.field("clusters");
    return (ODocument) (clusters.containsField(iClusterName) ? clusters.field(iClusterName) : clusters.field("*"));
  }

  /**
   * Distributed the request to all the configured nodes. Each node has the responsibility to bring the message early (synch-mode)
   * or using an asynchronous queue.
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.