code: @Override
      public Long toPosition(ResultSet resultSet, int columnIndex, int colType)
              throws SQLException {
          Date result;
          switch (colType) {
              case Types.DATE:
                  result = resultSet.getDate(columnIndex);
                  break;
              case Types.TIME:
                  result = resultSet.getTime(columnIndex);
                  break;
              default:
                  /*
                   * We'll end up here for Types.TIMESTAMP and non-date SQL data
                   * types. For the latter, we'll let the JDBC driver try to 
                   * parse a date.
                   */
                  result = resultSet.getTimestamp(columnIndex);
          }
          if (result != null) {
              return AbsoluteTimeGranularityUtil.asPosition(result);
          } else {
              return this.defaultDate;
          }
  
      }
docs: Parses a date/time into a PROTEMPA position. For types date, time and
  timestamp it calls the corresponding method in {@link ResultSet}. For
  other types, it calls {@link ResultSet#getTimestamp(int)} and lets the
  JDBC driver attempt to parse a date.
  
  @param resultSet a {@link ResultSet}. Cannot be <code>null</code>.
  @param columnIndex the index of the column to retrieve from the result
  set.
  @param colType the SQL type of the column as a {@link Types}.
  @return a PROTEMPA position or <code>null</code> if the column in the
  database is <code>NULL</code>.
  
  @throws SQLException if there is an error accessing the result set or the
  column cannot be parsed into a date.