@Override public Long save(Coll<?> coll, String id, JsonElement data) { DBCollection dbcoll = fixColl(coll); BasicDBObject dbo = new BasicDBObject(); Long mtime = System.currentTimeMillis(); dbo.put(ID_FIELD, id); dbo.put(MTIME_FIELD, mtime); GsonMongoConverter.gson2MongoObject(data, dbo); dbcoll.save(dbo, MassiveCoreMConf.get().getMongoDbWriteConcernSave()); return mtime; }
@Override public void delete(Coll<?> coll, String id) { DBCollection dbcoll = fixColl(coll); dbcoll.remove( new BasicDBObject(ID_FIELD, id), MassiveCoreMConf.get().getMongoDbWriteConcernDelete()); }