protected boolean handleSpecialObjects(String name, BSONObject o) { if (o == null) return false; if (o instanceof DBCollection) { DBCollection c = (DBCollection) o; putDBPointer(name, c.getName(), Bytes.COLLECTION_REF_ID); return true; } if (name != null && o instanceof DBPointer) { DBPointer r = (DBPointer) o; putDBPointer(name, r._ns, (ObjectId) r._id); return true; } return false; }
protected boolean putSpecial(String name, Object val) { if (val instanceof DBPointer) { DBPointer r = (DBPointer) val; putDBPointer(name, r._ns, (ObjectId) r._id); return true; } if (val instanceof DBRefBase) { putDBRef(name, (DBRefBase) val); return true; } return false; }