com.lucidera.runtime
Class LucidDbRuntimeContext.ErrorLoggerBase

java.lang.Object
  extended by com.lucidera.runtime.LucidDbRuntimeContext.ErrorLoggerBase
All Implemented Interfaces:
LucidDbRuntimeContext.ErrorLogger
Direct Known Subclasses:
LucidDbRuntimeContext.DefaultErrorLogger, LucidDbRuntimeContext.ErrorQuotaLogger
Enclosing class:
LucidDbRuntimeContext

private abstract class LucidDbRuntimeContext.ErrorLoggerBase
extends Object
implements LucidDbRuntimeContext.ErrorLogger

Base class for error loggers


Field Summary
private  int errorCount
           
protected  int fieldCount
           
private  Field[] fields
           
protected  String[] names
           
protected  SyntheticObject row
           
protected  Object[] values
           
private  int warningCount
           
 
Constructor Summary
private LucidDbRuntimeContext.ErrorLoggerBase()
           
 
Method Summary
 void completeDeferredException(RuntimeException ex)
          Completes defered exception during record logging
 int getErrorCount()
          Gets the number of errors processed by this logger
protected  String getFieldName(String tag, int columnIndex)
          Gets the name of an IterCalcRel's output column.
protected  String getName(int index)
          Gets the name of a field
protected  String getRecordString()
          Gets an unquoted string representation of the current record
protected  Object getValue(int index)
          Gets the value of a field
 int getWarningCount()
          Gets the number of warnings processed by this logger
protected abstract  EigenbaseException log(RuntimeException ex, int columnIndex, String tag, boolean isWarning, String errorCode, String columnName)
          Writes the current log record
 void log(String[] names, Object[] values, RuntimeException ex, int columnIndex, String tag, boolean isWarning)
          Writes a record to a log file
 EigenbaseException log(String[] names, Object[] values, RuntimeException ex, int columnIndex, String tag, boolean isWarning, String errorCode, String columnName)
          Writes a record to a log file
 void log(SyntheticObject row, RuntimeException ex, int columnIndex, String tag, boolean isWarning)
          Writes a record to a log file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.lucidera.runtime.LucidDbRuntimeContext.ErrorLogger
getFilename
 

Field Detail

errorCount

private int errorCount

warningCount

private int warningCount

fieldCount

protected int fieldCount

row

protected SyntheticObject row

fields

private Field[] fields

names

protected String[] names

values

protected Object[] values
Constructor Detail

LucidDbRuntimeContext.ErrorLoggerBase

private LucidDbRuntimeContext.ErrorLoggerBase()
Method Detail

getFieldName

protected String getFieldName(String tag,
                              int columnIndex)
Gets the name of an IterCalcRel's output column. If the rel is being used for table DML, the column name will be inferred from the table. Otherwise the column name is the columnIndex.

Parameters:
tag - error handling tag used to identify an IterCalcRel
columnIndex - a 1-based column index of an output column
Returns:
name of output column

getErrorCount

public int getErrorCount()
Description copied from interface: LucidDbRuntimeContext.ErrorLogger
Gets the number of errors processed by this logger

Specified by:
getErrorCount in interface LucidDbRuntimeContext.ErrorLogger

getWarningCount

public int getWarningCount()
Description copied from interface: LucidDbRuntimeContext.ErrorLogger
Gets the number of warnings processed by this logger

Specified by:
getWarningCount in interface LucidDbRuntimeContext.ErrorLogger

log

public void log(SyntheticObject row,
                RuntimeException ex,
                int columnIndex,
                String tag,
                boolean isWarning)
Writes a record to a log file

Specified by:
log in interface LucidDbRuntimeContext.ErrorLogger

log

public void log(String[] names,
                Object[] values,
                RuntimeException ex,
                int columnIndex,
                String tag,
                boolean isWarning)
Writes a record to a log file

Specified by:
log in interface LucidDbRuntimeContext.ErrorLogger

log

public EigenbaseException log(String[] names,
                              Object[] values,
                              RuntimeException ex,
                              int columnIndex,
                              String tag,
                              boolean isWarning,
                              String errorCode,
                              String columnName)
Writes a record to a log file

Specified by:
log in interface LucidDbRuntimeContext.ErrorLogger

completeDeferredException

public void completeDeferredException(RuntimeException ex)
Description copied from interface: LucidDbRuntimeContext.ErrorLogger
Completes defered exception during record logging

Specified by:
completeDeferredException in interface LucidDbRuntimeContext.ErrorLogger

log

protected abstract EigenbaseException log(RuntimeException ex,
                                          int columnIndex,
                                          String tag,
                                          boolean isWarning,
                                          String errorCode,
                                          String columnName)
Writes the current log record


getName

protected String getName(int index)
Gets the name of a field

Parameters:
index - zero-based column index

getValue

protected Object getValue(int index)
                   throws IllegalAccessException
Gets the value of a field

Parameters:
index - zero-based column index
Throws:
IllegalAccessException

getRecordString

protected String getRecordString()
Gets an unquoted string representation of the current record