public Object encode(DBObject dbObject, Class variomlClass, String asNamed) { DBObject d = (DBObject) dbObject.get(asNamed); if (d == null) { // todo: use Logger throw new RuntimeException("Cannot encode DBObject (" + asNamed + "). Object not found"); } Object _v = toVarioML(BSON.encode(d), variomlClass); return _v; }
public Object encode(DBObject dbObject, Class variomlClass) { Object _v = toVarioML(BSON.encode(dbObject), variomlClass, IGNORE_ID_FIELD); return _v; }
@Override public byte[] toBytes(BSONObject m) throws Exception { return BSON.encode(m); }