Examples of containsField()


Examples of org.bson.BSONObject.containsField()

    Assert.assertEquals(100, response.getNumberReturned());
    Assert.assertEquals(100, response.getDocuments().size());
   
    for (int i = 0; i < 100; i++) {
      BSONObject doc = response.getDocuments().get(i);
      Assert.assertTrue(doc.containsField("_id"));
      Assert.assertTrue(doc.containsField("name"));
      Assert.assertFalse(doc.containsField("value"));
    }
  }
 
View Full Code Here

Examples of org.bson.BasicBSONObject.containsField()

            // multi and upsert 'options' JSON
            boolean isUpsert = true;
            boolean isMulti = false;
            BasicBSONObject mu = toUpdate.length > 2 ? toUpdate[2] : null;
            if (mu != null) {
                isUpsert = !mu.containsField("upsert") || mu.getBoolean("upsert");
                isMulti = mu.containsField("multi") && mu.getBoolean("multi");
            }

            recordWriter.write(null, new MongoUpdateWritable(q, u,
                                                             isUpsert,
View Full Code Here

Examples of org.infinispan.schematic.document.Document.containsField()

                return projectionsByWorkspace;
            }
            Document externalSources = federation.getDocument(FieldName.EXTERNAL_SOURCES);
            for (String sourceName : externalSources.keySet()) {
                Document externalSource = externalSources.getDocument(sourceName);
                if (!externalSource.containsField(FieldName.PROJECTIONS)) {
                    continue;
                }

                for (Object projectionExpression : externalSource.getArray(FieldName.PROJECTIONS)) {
                    ProjectionConfiguration projectionConfiguration = new ProjectionConfiguration(sourceName,
View Full Code Here

Examples of org.infinispan.schematic.document.EditableDocument.containsField()

            // Create a new configuration document ...
            EditableDocument config = Schematic.newDocument(repositoryConfiguration.getDocument());

            config.getOrCreateDocument(FieldName.STORAGE).setDocument(FieldName.BINARY_STORAGE, binaryConfig);

            if (config.containsField(FieldName.JOURNALING)) {
                if (StringUtil.isBlank(this.journalRelativeTo)) {
                    this.journalRelativeTo = getDataDirectoryPathInjector().getValue();
                }
                if (StringUtil.isBlank(this.journalPath)) {
                    this.journalPath = "journal";
View Full Code Here

Examples of org.infinispan.schematic.internal.document.MutableDocument.containsField()

    @Override
    public void replay( MutableDocument delegate ) {
        MutableDocument parent = mutableParent(delegate);
        assert parent != null;
        if (!parent.containsField(fieldName)) {
            parent.put(fieldName, newValue);
            absent = true;
        }
    }
View Full Code Here

Examples of org.vertx.java.core.json.JsonObject.containsField()

                }

                final JsonObject json = new JsonObject(writer.toString());
                final String fragment = uri.getFragment();
                if (fragment != null) {
                    if (json.containsField(fragment)) {
                        return json.getObject(fragment);
                    } else {
                        throw new RuntimeException("Fragment #" + fragment + " not found!");
                    }
                }
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.