com.northconcepts.datapipeline.validate
Class ValidatingReader

java.lang.Object
  extended by com.northconcepts.datapipeline.core.DataEndpoint
      extended by com.northconcepts.datapipeline.core.DataReader
          extended by com.northconcepts.datapipeline.core.ProxyReader
              extended by com.northconcepts.datapipeline.filter.FilteringReader
                  extended by com.northconcepts.datapipeline.validate.ValidatingReader

public class ValidatingReader
extends FilteringReader

A proxy that validates records by applying a set of filters.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State
 
Field Summary
 
Fields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
BUFFER_SIZE, log
 
Constructor Summary
ValidatingReader(DataReader reader)
           
 
Method Summary
 DataException addExceptionProperties(DataException exception)
          Adds this endpoint's current state to a DataException.
protected  Record discard(Record record, Filter filter)
           
 boolean isExceptionOnFailure()
           
 boolean isRecordStackTraceInMessage()
           
 ValidatingReader setExceptionOnFailure(boolean exceptionOnFailure)
           
 ValidatingReader setRecordStackTraceInMessage(boolean recordStackTraceInMessage)
           
 
Methods inherited from class com.northconcepts.datapipeline.filter.FilteringReader
add, get, getCount, getCurrentFilter, interceptRecord, remove, removeAll
 
Methods inherited from class com.northconcepts.datapipeline.core.ProxyReader
available, close, getNestedReader, open, readImpl, setNestedDataReader, setNestedDataReader
 
Methods inherited from class com.northconcepts.datapipeline.core.DataReader
getBufferSize, getRootReader, peek, pop, push, read, skip
 
Methods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
assertNotOpened, assertOpened, decrementRecordCount, exception, exception, exception, finalize, getDescription, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, getState, incrementRecordCount, isClosed, isOpen, isRecordCountBigInteger, resetRecordCount, setDescription, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValidatingReader

public ValidatingReader(DataReader reader)
Method Detail

isExceptionOnFailure

public boolean isExceptionOnFailure()

setExceptionOnFailure

public ValidatingReader setExceptionOnFailure(boolean exceptionOnFailure)

isRecordStackTraceInMessage

public boolean isRecordStackTraceInMessage()

setRecordStackTraceInMessage

public ValidatingReader setRecordStackTraceInMessage(boolean recordStackTraceInMessage)

discard

protected Record discard(Record record,
                         Filter filter)
Overrides:
discard in class FilteringReader

addExceptionProperties

public DataException addExceptionProperties(DataException exception)
Description copied from class: DataEndpoint
Adds this endpoint's current state to a DataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.

Overrides:
addExceptionProperties in class FilteringReader


Copyright (c) 2007-2012 North Concepts Inc. All Rights Reserved.