Examples of BasicBSONObject


Examples of org.bson.BasicBSONObject

import java.util.List;
import java.util.Map;

public class Bsonify {
  public static BSONObject queryToBson(Query query) {
    BSONObject b = new BasicBSONObject();
    b.put("Sql", query.getSql());
    b.put("Keyspace", query.getKeyspace());
    b.put("TabletType", query.getTabletType());
    if (query.getBindVars() != null) {
      b.put("BindVariables", bindVarsToBSON(query.getBindVars()));
    }
    if (query.getKeyspaceIds() != null) {
      b.put("KeyspaceIds", query.getKeyspaceIds());
    } else {
      b.put("KeyRanges", query.getKeyRanges());
    }
    if (query.getSession() != null) {
      b.put("Session", query.getSession());
    }
    return b;
  }
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.