code: public T findOne(DBObject query, DBObject fields, ReadPreference readPref) {
          DBCursor<T> cursor = find(query, fields).setReadPreference(readPref);
          if (cursor.hasNext()) {
              return cursor.next();
          } else {
              return null;
          }
      }
docs: Returns a single object from this collection matching the query.
  
  @param query    the query object
  @param fields   fields to return
  @param readPref The read preference
  @return the object found, or <code>null</code> if no such object exists