## org.eclipse.datatools.sqltools.parsers.sql
Class SQLParseErrorInfo

    java.lang.Object
      org.eclipse.datatools.sqltools.parsers.sql.SQLParseErrorInfo

    public class SQLParseErrorInfo

extends java.lang.Object

This class provides information about an error that may occur when the `SQLQueryParser` parses an input that either is ambiguous to interpret or is not valid according to the parser's grammar rules. In such a case the parser throws an `SQLParserException`, which contains a List of `SQLParseErrorInfo` objects. An `SQLParseErrorInfo` contains information about the position of the error, the token or token sequence (word/character or phrase) that caused the error and a suggestion how to correct the wrong input.

- parserErrorMessage - the parser message describing the error
- errorSourceText - the input token/token sequence causing the parse error
- expectedText - the token/token sequence that is expected instead
- lineNumberStart, columnNumberStart - the Y and X position where the error starts
- lineNumberEnd, columnNumberEnd - the Y and X position where the error ends

Author:
  ckadner
See Also:
  `org.eclipse.datatools.sqltools.parsers.sql.query.SQLParserManager#parse(String)`

Field Summary
`static java.lang.String` `NO_CORRECTION_AVAILABLE`

Constructor Summary
`SQLParseErrorInfo(int lineNumberStart, int columnNumberStart, int lineNumberEnd, int columnNumberEnd, java.lang.String errorSourceText, java.lang.String expectedText, java.lang.String parserErrorMessage, java.lang.String errorCode)`
`SQLParseErrorInfo(SQLQuerySourceInfo sourceInfo, java.lang.String expectedText, java.lang.String parserErrorMessage, java.lang.String errorCode)` The given `SQLQuerySourceInfo` provides: lineNumberStart columnNumberStart lineNumberEnd columnNumberEnd errorSourceText

Method Summary
`int` `getColumnNumberEnd()`
`int` `getColumnNumberStart()`
`java.lang.String` `getErrorCode()` Returns the static `errorCode` to be compared by reference to String constants.
`java.lang.String` `getErrorSourceText()` Return the text causing the parser exception.
`java.lang.String` `getExpectedText()`
`int` `getLineNumberEnd()`
`int` `getLineNumberStart()`
`java.lang.String` `getParserErrorMessage()`
`void` `setColumnNumberEnd(int columnNumberEnd)`
`void` `setColumnNumberStart(int columnNumberStart)`
`void` `setErrorCode(java.lang.String errorCode)` Sets the static `errorCode` to be compared by refenrence rather than by value - use String constants!
`void` `setErrorSourceText(java.lang.String errorSourceText)` Sets the text causing the parser exception.
`void` `setExpectedText(java.lang.String expectedText)`
`void` `setLineNumberEnd(int lineNumberEnd)`
`void` `setLineNumberStart(int lineNumberStart)`
`void` `setParserErrorMessage(java.lang.String parserErrorMessage)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### NO_CORRECTION_AVAILABLE

    public static final java.lang.String NO_CORRECTION_AVAILABLE

Constructor Detail

### SQLParseErrorInfo

    public SQLParseErrorInfo(int lineNumberStart,
                             int columnNumberStart,
                             int lineNumberEnd,
                             int columnNumberEnd,
                             java.lang.String errorSourceText,
                             java.lang.String expectedText,
                             java.lang.String parserErrorMessage,
                             java.lang.String errorCode)

Parameters:
  `lineNumberStart` -
  `columnNumberStart` -
  `lineNumberEnd` -
  `columnNumberEnd` -
  `errorSourceText` -
  `expectedText` -
  `parserErrorMessage` -
  `errorCode` -

### SQLParseErrorInfo

    public SQLParseErrorInfo(SQLQuerySourceInfo sourceInfo,
                             java.lang.String expectedText,
                             java.lang.String parserErrorMessage,
                             java.lang.String errorCode)

  The given `SQLQuerySourceInfo` provides:
  - lineNumberStart
  - columnNumberStart
  - lineNumberEnd
  - columnNumberEnd
  - errorSourceText

  Parameters:
    `sourceInfo` -
    `expectedText` -
    `parserErrorMessage` -
    `errorCode` -

Method Detail

### getColumnNumberEnd

    public int getColumnNumberEnd()

  Returns:
    Returns the columnNumberEnd.

### setColumnNumberEnd

    public void setColumnNumberEnd(int columnNumberEnd)

  Parameters:
    `columnNumberEnd` - The columnNumberEnd to set.

### getColumnNumberStart

    public int getColumnNumberStart()

  Returns:
    Returns the columnNumberStart.

### setColumnNumberStart

    public void setColumnNumberStart(int columnNumberStart)

  Parameters:
    `columnNumberStart` - The columnNumberStart to set.

### getErrorSourceText

    public java.lang.String getErrorSourceText()

  Return the text causing the parser exception.

  Returns:
    Returns the errorSourceText.

### setErrorSourceText

    public void setErrorSourceText(java.lang.String errorSourceText)

  Sets the text causing the parser exception.

  Parameters:
    `errorSourceText` - The errorSourceText to set.

### getExpectedText

    public java.lang.String getExpectedText()

  Returns:
    Returns the expectedText.

### setExpectedText

    public void setExpectedText(java.lang.String expectedText)

  Parameters:
    `expectedText` - The expectedText to set.

### getLineNumberEnd

    public int getLineNumberEnd()

  Returns:
    Returns the lineNumberEnd.

### setLineNumberEnd

    public void setLineNumberEnd(int lineNumberEnd)

  Parameters:
    `lineNumberEnd` - The lineNumberEnd to set.

### getLineNumberStart

    public int getLineNumberStart()

  Returns:
    Returns the lineNumberStart.

### setLineNumberStart

    public void setLineNumberStart(int lineNumberStart)

  Parameters:
    `lineNumberStart` - The lineNumberStart to set.

### getParserErrorMessage

    public java.lang.String getParserErrorMessage()

  Returns:
    Returns the parserErrorMessage.

### setParserErrorMessage

    public void setParserErrorMessage(java.lang.String parserErrorMessage)

  Parameters:
    `parserErrorMessage` - The parserErrorMessage to set.

### getErrorCode

    public java.lang.String getErrorCode()

  Returns the static `errorCode` to be compared by reference to String constants.

  Returns:
    the static `errorCode` to reference-compare

### setErrorCode

    public void setErrorCode(java.lang.String errorCode)

  Sets the static `errorCode` to be compared by refenrence rather than by value - use String constants!

  Parameters:
    `errorCode` - The errorCode to set.