Examples of BasicDBList


Examples of com.mongodb.BasicDBList

        AggregationOutput aggregationResult = null;

        // Allow body to be a pipeline
        // @see http://docs.mongodb.org/manual/core/aggregation/
        if (query instanceof BasicDBList) {
            BasicDBList queryList = (BasicDBList)query;
            aggregationResult = dbCol.aggregate((DBObject)queryList.get(0), queryList
                .subList(1, queryList.size()).toArray(new BasicDBObject[queryList.size() - 1]));
        } else {
            aggregationResult = dbCol.aggregate(query);
        }

        dbIterator = aggregationResult.results();
View Full Code Here

Examples of com.mongodb.BasicDBList

            AggregationOutput aggregationResult = null;

            // Allow body to be a pipeline
            // @see http://docs.mongodb.org/manual/core/aggregation/
            if (query instanceof BasicDBList) {
                BasicDBList queryList = (BasicDBList)query;
                aggregationResult = dbCol.aggregate((DBObject)queryList.get(0), queryList
                    .subList(1, queryList.size()).toArray(new BasicDBObject[queryList.size() - 1]));
            } else {
                aggregationResult = dbCol.aggregate(query);
            }

            dbIterator = aggregationResult.results();
View Full Code Here

Examples of com.mongodb.BasicDBList

        transformedWaveletDelta.getApplicationTimestamp());

    mongoTransformedWaveletDelta.append(FIELD_APPLIEDATVERSION,
        transformedWaveletDelta.getAppliedAtVersion());

    BasicDBList mongoWaveletOperations = new BasicDBList();

    for (WaveletOperation op : transformedWaveletDelta) {
      mongoWaveletOperations.add(serialize(op));
    }

    mongoTransformedWaveletDelta.append(FIELD_OPS, mongoWaveletOperations);

    return mongoTransformedWaveletDelta;
View Full Code Here

Examples of com.mongodb.BasicDBList

    ParticipantId author = deserializeParicipantId((DBObject) dbObject.get(FIELD_AUTHOR));
    HashedVersion resultingVersion =
        deserializeHashedVersion((DBObject) dbObject.get(FIELD_RESULTINGVERSION));
    long applicationTimestamp = (Long) dbObject.get(FIELD_APPLICATIONTIMESTAMP);

    BasicDBList dbOps = (BasicDBList) dbObject.get(FIELD_OPS);
    ImmutableList.Builder<WaveletOperation> operations = ImmutableList.builder();

    int numOperations = dbOps.size();

    // Code analog to ProtoDeltaStoreDataSerializer.deserialize
    for (int i = 0; i < numOperations; i++) {

      WaveletOperationContext context;
      if (i == numOperations - 1) {
        context = new WaveletOperationContext(author, applicationTimestamp, 1, resultingVersion);
      } else {
        context = new WaveletOperationContext(author, applicationTimestamp, 1);
      }
      operations.add(deserializeWaveletOperation((DBObject) dbOps.get(i), context));
    }

    return new TransformedWaveletDelta(author, resultingVersion, applicationTimestamp,
        operations.build());
  }
View Full Code Here

Examples of com.mongodb.BasicDBList

    @Override
    public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) {
        if (fromDBObject == null) return null;

        BasicDBList rawList = (BasicDBList) fromDBObject;

        List core = new ArrayList();
        for(Object obj : rawList) {
            DBObject dbObj = (DBObject) obj;
            core.add(getMapper().fromDBObject(optionalExtraInfo.getSubClass(), dbObj, getMapper().createEntityCache()));
View Full Code Here

Examples of com.mongodb.BasicDBList

    @Override
    public Object encode(Object value, MappedField optionalExtraInfo) {
        if (value == null) return null;

        CopyOnWriteList copyOnWriteList = (CopyOnWriteList) value;
        List core = new BasicDBList();

        for(Object obj : copyOnWriteList) {
            core.add(getMapper().toDBObject(obj));
        }

        return core;
    }
View Full Code Here

Examples of com.mongodb.BasicDBList

    @Override
    public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) {
        if (fromDBObject == null) return null;

        BasicDBList rawList = (BasicDBList) fromDBObject;

        AxisList axisList = new AxisList();
        for(Object obj : rawList) {
            DBObject dbObj = (DBObject) obj;
            axisList.add((Axis) getMapper().fromDBObject(optionalExtraInfo.getSubClass(), dbObj, getMapper().createEntityCache()));
View Full Code Here

Examples of com.mongodb.BasicDBList

    public Object encode(Object value, MappedField optionalExtraInfo) {
        if (value == null) return null;

        AxisList axisList = (AxisList) value;

        BasicDBList convertedList = new BasicDBList();

        for(Axis axis : axisList) {
            convertedList.add(getMapper().toDBObject(axis));
        }

        return convertedList;
    }
View Full Code Here

Examples of com.mongodb.BasicDBList

    @Override
    public Object decode(Class targetClass, Object fromDBObject, MappedField optionalExtraInfo) {
        if (fromDBObject == null) return null;

        BasicDBList rawList = (BasicDBList) fromDBObject;

        List list = new ArrayList();
        for(Object obj : rawList) {
            DBObject dbObj = (DBObject) obj;
            list.add(getMapper().fromDBObject(optionalExtraInfo.getSubClass(), dbObj, getMapper().createEntityCache()));
View Full Code Here

Examples of com.mongodb.BasicDBList

    public Object encode(Object value, MappedField optionalExtraInfo) {
        if (value == null) return null;

        DescribableList describableList = (DescribableList) value;

        BasicDBList convertedList = new BasicDBList();

        for(Object obj : describableList.toList()) {
            convertedList.add(getMapper().toDBObject(obj));
        }

        return convertedList;
    }
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.