154155156157158159160161
public DBObject toDBObject(final Object entity) { try { return mapper.toDBObject(entity); } catch (Exception e) { throw new MappingException("Could not map entity to DBObject", e); } }