ProcessorErrorHandler implementation that gives the user a chance to provide a default value for
columns that could not be processed due to an exception, through the method setDefaultValue(Object).
This must be called from within the implementation of the
handleError(DataProcessingException, Object[], Context) method, and will prevent the record from being
discarded. The value provided by the user will be assigned to the problematic input row, at the column defined by
DataProcessingException#getColumnIndex()Note
If the column index is < 0, then the record can't be
salvaged and it will be discarded regardless of the user calling setDefaultValue(Object) or not.
DataProcessingException, TextParsingException, AbstractParser, AbstractWriter, CommonSettings, Context
| Modifier and Type | Field and Description |
|---|---|
| private Object | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Object | Returns: the value to be used for the current column. It will be discarded after handling the currentDataProcessingException.Returns the default value to be assigned to the problematic column that raised the current |
| public final boolean | Returns: true if the record originating the current DataProcessingException should be skipped,
otherwise falseFlag indicating whether the current record will be skipped. |
| public final void | keepRecord()
Ignores the |
| pack-priv final void | |
| public final void | setDefaultValue(Object
the value to be used for the current column. It will be discarded after handling the current
defaultValue)DataProcessingException.Assigns a default value to be assigned to the problematic column that raised the current |
| defaultValue | back to summary |
|---|---|
| private Object defaultValue | |
| skipRecord | back to summary |
|---|---|
| private boolean skipRecord | |
| RetryableErrorHandler | back to summary |
|---|---|
| public RetryableErrorHandler() | |
| getDefaultValue | back to summary |
|---|---|
| public final Object getDefaultValue() Returns the default value to be assigned to the problematic column that raised the current Note If the column index is
| |
| isRecordSkipped | back to summary |
|---|---|
| public final boolean isRecordSkipped() Flag indicating whether the current record will be skipped. Returns
| |
| keepRecord | back to summary |
|---|---|
| public final void keepRecord() Ignores the | |
| prepareToRun | back to summary |
|---|---|
| pack-priv final void prepareToRun() Prepares this error handler to be executed. This is called automatically by the library prior to invoking
method | |
| setDefaultValue | back to summary |
|---|---|
| public final void setDefaultValue(Object defaultValue) Assigns a default value to be assigned to the problematic column that raised the current Note If the column index is
| |