/**
  * Initializes a new database cursor
  *
  * @param collection collection to use
  * @param q query to perform
  * @param k keys to return from the query
  * @param preference the Read Preference for this query
  */
 public DBCursor(DBCollection collection, DBObject q, DBObject k, ReadPreference preference) {
   _collection = collection;
   _query = q == null ? new BasicDBObject() : q;
   _keysWanted = k;
   if (_collection != null) {
     _options = _collection.getOptions();
   }
   _readPref = preference;
   _decoderFact = collection.getDBDecoderFactory();
 }