Пример #1
0
 @SuppressWarnings("unchecked")
 private BasicDBObject modifyQuery(Bson query) {
   BasicDBObject bdo = new BasicDBObject((Map<String, Object>) query);
   Object _id = bdo.remove("_id");
   if (null != _id) {
     List<BasicDBObject> tmpList = new ArrayList<BasicDBObject>(2);
     tmpList.add(new BasicDBObject(Constants.TX_REF, _id));
     tmpList.add(new BasicDBObject(Constants.TX_TARGET_ID, _id));
     bdo.append("$or", tmpList);
   }
   bdo.append(Constants.TX_MAP_COLL, coll.getNamespace().getCollectionName());
   return bdo;
 }
Пример #2
0
 @Override
 public MongoNamespace getNamespace() {
   return coll.getNamespace();
 }