code: public RecordIterator getRecords() {
      verifyProperty(dbname, "database");
      verifyProperty(collectionName, "collection");
      
      try {
        final MongoClient mongo;
        final DB database;
        final DBCollection collection;
        final DBCursor result;
        
        final DBObject queryDocument;
        final DBObject projectionDocument;
        
  	  // authentication mecanism via MONGODB-CR authentication http://docs.mongodb.org/manual/core/authentication/#authentication-mongodb-cr
        if(auth.equals(AUTH_ON_DB)){
          verifyProperty(username, "user-name");
          verifyProperty(password, "password");
          
          mongo = new MongoClient(
            new ServerAddress(mongouri, port), 
            Arrays.asList(MongoCredential.createMongoCRCredential(username, dbname, password.toCharArray()))
          );
        }
        else if(auth.equals(AUTH_ON_ADMIN)){
          verifyProperty(username, "user-name");
          verifyProperty(password, "password");
          
    		mongo = new MongoClient(
            new ServerAddress(mongouri, port), 
            Arrays.asList(MongoCredential.createMongoCRCredential(username, AUTH_ON_ADMIN, password.toCharArray()))
          );
        }
        else{
          mongo = new MongoClient(new ServerAddress(mongouri, port));
        }
        
        // get db, collection
        database = mongo.getDB(dbname);
        collection = database.getCollection(collectionName);
        
        // execute query
        queryDocument = (DBObject)JSON.parse(query);
        if(projection==null){
          result = collection.find(queryDocument);
        }
        else{
            projectionDocument = (DBObject)JSON.parse(projection);
            result = collection.find(queryDocument, projectionDocument);
        }
        
        // See: http://api.mongodb.org/java/current/com/mongodb/DBCursor.html#addOption(int)
        // and http://api.mongodb.org/java/current/com/mongodb/Bytes.html#QUERYOPTION_NOTIMEOUT
        if(noTimeOut){
          result.addOption(Bytes.QUERYOPTION_NOTIMEOUT);
        }
  	  
        return new MongoDBIterator(result, mongo);
      
      } catch (UnknownHostException e) {
        throw new RuntimeException(e);
      } catch (Exception ex){
  	  throw new DukeException(ex);
      }
    }
docs: ----------