return count;
}
private <T>void update(Series<T> series, TimeAddressable<Double> values) throws T2DBException {
com.mongodb.DBObject operation = null;
Range range = values.getRange();
Map<String, Double> data = new HashMap<String, Double>();
for (Observation<Double> obs : values) {
data.put(Long.toString(obs.getIndex()), obs.getValue());
}
operation = operation(Operator.SET,
MongoDatabase.FLD_SER_FIRST, range.getFirstIndex(),
MongoDatabase.FLD_SER_LAST, range.getLastIndex(),
MongoDatabase.FLD_SER_VALUES, data);
Surrogate s = series.getSurrogate();
getMongoDB(s).getSeries().update(asQuery(s.getId()), operation);
}