Examples of containsField()


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

    doc.save();

    // RELOAD FROM THE CACHE
    doc.reload(null, false);
    Assert.assertEquals(doc.field("nick"), "LucaPhotoTest");
    Assert.assertTrue(doc.containsField("photo"));

    // RELOAD FROM DISK
    doc.reload();
    Assert.assertEquals(doc.field("nick"), "LucaPhotoTest");
    Assert.assertFalse(doc.containsField("photo")); // THIS IS DECLARED TRANSIENT IN SCHEMA (see SchemaTest.java)
View Full Code Here

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

    Assert.assertTrue(doc.containsField("photo"));

    // RELOAD FROM DISK
    doc.reload();
    Assert.assertEquals(doc.field("nick"), "LucaPhotoTest");
    Assert.assertFalse(doc.containsField("photo")); // THIS IS DECLARED TRANSIENT IN SCHEMA (see SchemaTest.java)

    database.close();
  }

  @Test
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()

    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

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 org.apache.bcel.generic.ClassGen.containsField()

     * @param name field name
     * @return <code>true</code> if field was present, <code>false</code> if not
     */
    public boolean deleteField(String name) {
        ClassGen cg = getClassGen();
        Field field = cg.containsField(name);
        if (field == null) {
            return false;
        } else {
            cg.removeField(field);
            m_isModified = true;
View Full Code Here

Examples of org.apache.gora.mongodb.utils.BSONDecorator.containsField()

    // Populate each field
    for (String f : dbFields) {
      // Check the field exists in the mapping and in the db
      String docf = mapping.getDocumentField(f);
      if (docf == null || !easybson.containsField(docf))
        continue;

      DocumentFieldType storeType = mapping.getDocumentFieldType(docf);
      Field field = fieldMap.get(f);
      Schema fieldSchema = field.schema();
View Full Code Here

Examples of org.apache.hadoop.chukwa.extraction.engine.ChukwaRecord.containsField()

      int count = 0;

      ChukwaRecord record = null;
      while (values.hasNext()) {
        record = values.next();
        if (record.containsField("START_TIME")) {
          count++;
        } else {
          count--;
        }
      }
View Full Code Here

Examples of org.apache.hadoop.chukwa.extraction.engine.ChukwaRecord.containsField()

          halves = kvpair.split("=");
          record.add(halves[0], halves[1]);
          containRecord = true;
        }
      }
      if (record.containsField("Machine")) {
        buildGenericRecord(record, null, d.getTime(), "HodMachine");
      } else {
        buildGenericRecord(record, null, d.getTime(), "HodJob");
      }
      if (containRecord) {
View Full Code Here

Examples of org.apache.myfaces.extensions.validator.core.storage.PropertyStorage.containsField()

    }

    private void tryToCachedField(Class entity, String property, Field field)
    {
        PropertyStorage propertyStorage = getPropertyStorage();
        if (!propertyStorage.containsField(entity, property))
        {
            propertyStorage.storeField(entity, property, field);
        }
    }
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.