code: public QueryParameters get(int index) {
          if (getCurrentResultSet() == null && index > 0 && valueCached(index) == false) {
              // don't have anymore values in cache
              return null;
          }
  
          QueryParameters params = null;
  
          try {
              if (valueCached(index) == false) {
  
                  if (this.type == Type.READ_ONLY_FORWARD && currentIndex >= index) {
                      throw new MjdbcRuntimeException("Attempt to read current/previous value failed because it is not present in cache. " +
                              "Please increase maximum cache size via overrider or MjdbcConfig.");
                  }
  
                  if (this.type == Type.READ_ONLY_FORWARD) {
                      for (int i = currentIndex; i < index; i++) {
                          params = null;
  
                          do {
                              params = convertResultSetNextLine(getCurrentResultSet());
  
                              if (params == null) {
                                  closeResultSet(getCurrentResultSet());
                                  setCurrentResultSet(getNextResultSet());
                              }
                          } while (params == null && getCurrentResultSet() != null);
  
                          if (params != null) {
                              updateCache(i + 1, params);
                              currentIndex++;
                          } else {
                              if (getCurrentResultSet() == null) {
                                  break;
                              }
                          }
                      }
                  } else if (this.type == Type.READ_ONLY_SCROLL || this.type == Type.UPDATE_SCROLL) {
  
                      params = readResultSetRow((index + 1) - generatedCacheMap.size());
  
                      if (params != null) {
                          updateCache(index, params);
                      }
  
                  }
              } else {
                  params = readCachedValue(index);
              }
          } catch (SQLException ex) {
              throw new MjdbcRuntimeException("Failed to read ResultSet", ex);
          }
  
          if (params == null) {
              // It seems appropriate to return null rather then exception.
              // This might be changed in the future
          }
  
          return params;
      }
docs: Returns element at specified position. If no element was found - null is returned (in future exception
  might be thrown instead).
  
  @param index index of the element to return
  @return the element at the specified position in this list (null if nothing was found).
  @see {@link List#get(int)}