- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.pervasive.datarush.exceptions.DRException
-
- com.pervasive.datarush.operators.join.DataNotSortedException
-
- All Implemented Interfaces:
Serializable
public class DataNotSortedException extends DRException
Unchecked exception thrown to indicate that an input flow contains rows that are out of order.
- See Also:
Sort
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataNotSortedException(String prefix)
Constructs aDataNotSortedException
with the specified message prefix.DataNotSortedException(String prefix, TokenValued currentTV, TokenValued previousTV, int position)
Constructs aDataNotSortedException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCurrent()
Gets a string representation of the current row's keys at the point in the input flow where the incorrect row ordering was discovered.TokenValued
getCurrentTValue()
Return the token value where the sort order discrepancy occurred.String
getMessage()
Gets a message containing the prefix passed at construction time and any additional information supplied by setter methods, such as positional details on the specific field in a record (composite) typeint
getPosition()
String
getPrevious()
Gets a string representation of the previous row's keys at the point in the input flow where the incorrect row ordering was discovered.TokenValued
getPreviousTValue()
Return the previous token value before the sort order discrepancy occurred.long
getRowNumber()
Returns the row number where the exception occurred, or -1 if not available.DataNotSortedException
setCurrent(String current)
Sets a string representation of the current row's keys at the point in the input flow where incorrect row ordering was discovered.DataNotSortedException
setCurrentTValue(TokenValued currentTValue)
Internal use only: set the current token value where the sort order discrepancy occurred.DataNotSortedException
setPosition(int position)
DataNotSortedException
setPrevious(String previous)
Sets a string representation of the previous row's keys at the point in the input flow where incorrect row ordering was discovered.DataNotSortedException
setPreviousTValue(TokenValued previousTValue)
Internal use only: set the previous token value where the sort order discrepancy occurred.DataNotSortedException
setRowNumber(long rowNumber)
Sets the row number where the exception occurred, or -1 if not available.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
DataNotSortedException
public DataNotSortedException(String prefix)
Constructs aDataNotSortedException
with the specified message prefix. The out-of-order data values are not needed in the prefix: they can be supplied bysetCurrent(String)
andsetPrevious(String)
.- Parameters:
prefix
- the error message about sort order
-
DataNotSortedException
public DataNotSortedException(String prefix, TokenValued currentTV, TokenValued previousTV, int position)
Constructs aDataNotSortedException
.- Parameters:
prefix
- the error message about sort ordercurrentTV
- the current token valuepreviousTV
- the previous token valueposition
- the position of the current token value
-
-
Method Detail
-
getMessage
public String getMessage()
Gets a message containing the prefix passed at construction time and any additional information supplied by setter methods, such as positional details on the specific field in a record (composite) type- Overrides:
getMessage
in classThrowable
- Returns:
- the constructed error message
-
getCurrent
public String getCurrent()
Gets a string representation of the current row's keys at the point in the input flow where the incorrect row ordering was discovered.- Returns:
- current row's key values
-
setCurrent
public DataNotSortedException setCurrent(String current)
Sets a string representation of the current row's keys at the point in the input flow where incorrect row ordering was discovered.- Parameters:
current
- current row's key values- Returns:
- a reference to this exception
-
getPrevious
public String getPrevious()
Gets a string representation of the previous row's keys at the point in the input flow where the incorrect row ordering was discovered.- Returns:
- previous row's key values
-
setPrevious
public DataNotSortedException setPrevious(String previous)
Sets a string representation of the previous row's keys at the point in the input flow where incorrect row ordering was discovered.- Parameters:
previous
- previous row's key values- Returns:
- a reference to this exception
-
getPosition
public int getPosition()
- Returns:
- the position
-
setPosition
public DataNotSortedException setPosition(int position)
- Parameters:
position
- the position to set- Returns:
- a reference to this exception
-
getCurrentTValue
public TokenValued getCurrentTValue()
Return the token value where the sort order discrepancy occurred.- Returns:
- the currentTValue
-
setCurrentTValue
public DataNotSortedException setCurrentTValue(TokenValued currentTValue)
Internal use only: set the current token value where the sort order discrepancy occurred.- Parameters:
currentTValue
- the currentTValue to set- Returns:
- a reference to this exception
-
getPreviousTValue
public TokenValued getPreviousTValue()
Return the previous token value before the sort order discrepancy occurred.- Returns:
- the previousTValue
-
setPreviousTValue
public DataNotSortedException setPreviousTValue(TokenValued previousTValue)
Internal use only: set the previous token value where the sort order discrepancy occurred.- Parameters:
previousTValue
- the previousTValue to set- Returns:
- a reference to this exception
-
getRowNumber
public long getRowNumber()
Returns the row number where the exception occurred, or -1 if not available.- Returns:
- the row number where the exception occurred, or -1 if not available.
-
setRowNumber
public DataNotSortedException setRowNumber(long rowNumber)
Sets the row number where the exception occurred, or -1 if not available.- Parameters:
rowNumber
- the row number where the exception occurred, or -1 if not available.- Returns:
- a reference to this exception
-
-