Package org.bson

Examples of org.bson.BSONObject.toMap()


  @SuppressWarnings("UnusedParameters")
  public void checkHeader(String methodName, InputStream inputStream) throws IOException {
    // TODO(gco): Check sequence matches and method matches.
    BSONObject bsonHeader = goRpcBsonDecoder.readObject(inputStream);
    if (LOGGER.isDebugEnabled()) {
      String joinedBsonHeader = Joiner.on(',').withKeyValueSeparator("=").join(bsonHeader.toMap());
      LOGGER.debug("bsonHeader: {}", joinedBsonHeader);
    }
    if (bsonHeader.containsField("Error")) {
      Object error = bsonHeader.get("Error");
      if (error instanceof byte[] && ((byte[]) error).length != 0) {
View Full Code Here


            setAuthURI((MongoClientURI) null);
        }

        setKeyField((String) spec.get("keyField"));
        BSONObject temp = (BSONObject) spec.get("fields");
        setFields(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("query");
        setQuery(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("sort");
View Full Code Here

        setKeyField((String) spec.get("keyField"));
        BSONObject temp = (BSONObject) spec.get("fields");
        setFields(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("query");
        setQuery(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("sort");
        setSort(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("min");
View Full Code Here

        temp = (BSONObject) spec.get("query");
        setQuery(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("sort");
        setSort(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("min");
        setMin(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("max");
View Full Code Here

        temp = (BSONObject) spec.get("sort");
        setSort(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("min");
        setMin(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("max");
        setMax(temp != null ? new BasicDBObject(temp.toMap()) : null);

        setNoTimeout((Boolean) spec.get("notimeout"));
View Full Code Here

        temp = (BSONObject) spec.get("min");
        setMin(temp != null ? new BasicDBObject(temp.toMap()) : null);

        temp = (BSONObject) spec.get("max");
        setMax(temp != null ? new BasicDBObject(temp.toMap()) : null);

        setNoTimeout((Boolean) spec.get("notimeout"));
    }

    public DBCursor getCursor() {
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.