Package com.mongodb

Examples of com.mongodb.BasicDBList.addAll()


            result.put("fullyQualifiedClassName", className);
           
            List     packageComponents   = new BasicDBList();
            String[] packageAndClassName = className.split("\\.");
           
            packageComponents.addAll(Arrays.asList(packageAndClassName));
            // Requires Java 6
            //packageComponents.addAll(Arrays.asList(Arrays.copyOf(packageAndClassName, packageAndClassName.length - 1)));
           
            if (packageComponents.size() > 0)
            {
View Full Code Here


    //API: BasicDBList (like feeds in the full system)
    BasicDBList dbl = new BasicDBList();
    BasicDBObject db01 = new BasicDBObject("index", 1);
    BasicDBObject db02 = new BasicDBObject("index", 2);
    BasicDBObject db03 = new BasicDBObject("index", 3);
    dbl.addAll(Arrays.asList(db01, db02, db03));
    ResponsePojo rp2 = new ResponsePojo(null, dbl, (BasePojoApiMap<BasicDBList>)null);
    System.out.println("DBO=" + rp2.toApi());
   
    //API: test the V0 DocumentPojo, which has a few differences (including a static version for raw modification)
    BasicDBObject docApiDbo = (BasicDBObject) DbManager.getDocument().getMetadata().findOne();
View Full Code Here

    // Copy traceback info (if there is any) into the document
    String[] traceback = event.getThrowableStrRep();
    if (null != traceback && traceback.length > 0) {
      BasicDBList tbDbo = new BasicDBList();
      tbDbo.addAll(Arrays.asList(traceback));
      dbo.put(TRACEBACK, tbDbo);
    }

    // Put the rendered message into the document
    dbo.put(MESSAGE, event.getRenderedMessage());
View Full Code Here

     *            target value
     * @return
     */
    public FeatureDBObjectBuilder addRoles(Set<String> auths) {
        BasicDBList authorizations = new BasicDBList();
        authorizations.addAll(auths);
        builder.add(ROLES, authorizations);
        return this;
    }

    /**
 
View Full Code Here

   */
  @Override
  public <T, V> List<T> get(Class<T> classT, String key, List<V> values) {

    BasicDBList valuesIds = new BasicDBList();
    valuesIds.addAll(values);
    DBObject inClause = new BasicDBObject("$in", valuesIds);
    DBObject query = new BasicDBObject(key, inClause);
    DBCursor cur = getCollection(classT).find(query);

    List<T> list = new ArrayList<T>();
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.