code: public static String getFetchDirectionString(int direction) {
          switch (direction) {
              case ResultSet.FETCH_FORWARD:
                  return "FETCH FORWARD (" + direction + ')'; 
  
              case ResultSet.FETCH_REVERSE:
                  return "FETCH REVERSE (" + direction + ')'; 
  
              case ResultSet.FETCH_UNKNOWN:
                  return "FETCH UNKNOWN (" + direction + ')'; 
          }
  
          return "UNRECOGNIZED FETCH DIRECTION CONSTANT (" + direction + ')'; 
      }
docs: Display the java.sql.ResultSet fetch direction constant corresponding to the value
  supplied.
  
  @param level a valid java.sql.ResultSet fetch direction constant.
  
  @return the name of the constant, or a string indicating the constant is unknown.