Examples of BSONMap


Examples of mungbean.protocol.bson.BSONMap

        super(executor, dbName, collectionName, new MapBSONCoders(), new MapBSONCoders());
    }

    @Override
    public BSONCoder<Map<String, Object>> defaultEncoder() {
        return new BSONMap();
    }
View Full Code Here

Examples of mungbean.protocol.bson.BSONMap

@RunWith(JDaveRunner.class)
public class GetMoreRequestSpec extends Specification<DBTransaction<QueryResponse<Map<String, Object>>>> {
    public class WithValidRequest {
        public DBTransaction<QueryResponse<Map<String, Object>>> create() {
            return new DBTransaction<QueryResponse<Map<String, Object>>>(new GetMoreRequest<Map<String, Object>>("foozbar.foo", 123123L, 0, new BSONMap(), new MapBSONCoders()), 127);
        }
View Full Code Here

Examples of mungbean.protocol.bson.BSONMap

@RunWith(JDaveRunner.class)
public class QueryRequestSpec extends Specification<DBTransaction<QueryResponse<Map<String, Object>>>> {

    public class WithoutQueryRules {
        public DBTransaction<QueryResponse<Map<String, Object>>> create() {
            QueryRequest<Map<String, Object>> message = new QueryRequest<Map<String, Object>>("foozbar.foo", new QueryOptionsBuilder(), new Query(), new MapBSONCoders(), new BSONMap());
            return new DBTransaction<QueryResponse<Map<String, Object>>>(message, 124);
        }
View Full Code Here

Examples of mungbean.protocol.bson.BSONMap

        }
    }

    public class WithQueryContaingingRules {
        public DBTransaction<QueryResponse<Map<String, Object>>> create() {
            QueryRequest<Map<String, Object>> message = new QueryRequest<Map<String, Object>>("foozbar.foo", new QueryOptionsBuilder().slaveOk(), new Query().setLimit(10).field("foo").is("bar"), new MapBSONCoders(), new BSONMap());
            return new DBTransaction<QueryResponse<Map<String, Object>>>(message, 124);
        }
View Full Code Here

Examples of mungbean.protocol.bson.BSONMap

                    'o', 'k', 0, // 'ok'
                    0, 0, 0, 0, 0, 0, -16, 63, // 1
                    0 // eoo
            };
            ListQueryCallback<Map<String, Object>> callback = new ListQueryCallback<Map<String, Object>>();
            QueryResponse<Map<String, Object>> response = new QueryResponse<Map<String, Object>>(new LittleEndianDataReader(new ByteArrayInputStream(bytes)), new BSONMap(), new MapBSONCoders());
            response.readResponse(callback);
            return callback.values();
        }
View Full Code Here

Examples of mungbean.protocol.bson.BSONMap

        addEncoder(new BSONPattern());
        addEncoder(new RhinoBSONDate(scriptable, context));
        addEncoder(new BSONDate());
        addEncoder(new BSONBoolean());
        addEncoder(new RhinoBSONMap());
        addEncoder(new BSONMap());
    }
View Full Code Here

Examples of mungbean.protocol.bson.BSONMap

    private BSON buildQuery(AbstractBSONCoders coders, final Map<String, Object> query, final Map<String, Object> order) {
        Assert.notNull(query, "Query can not be null");
        if (order == null || order.isEmpty()) {
            return coders.forValue(query).write(coders, query);
        }
        return new BSONMap().write(coders, new LinkedHashMap<String, Object>() {
            {
                put("query", query);
                put("orderby", order);
            }
        });
View Full Code Here

Examples of mungbean.protocol.bson.BSONMap

        addEncoder(new BSONInteger());
        addEncoder(new BSONLong());
        addEncoder(new BSONNumber());
        addEncoder(new BSONString());
        addEncoder(new ClojureBSONMap());
        addEncoder(new BSONMap());
        addEncoder(new BSONOid());
        addEncoder(new BSONPattern());
        addEncoder(new BSONDate());
        addEncoder(new BSONBoolean());
    }
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.