com.rhi.architecture.parc
Class AbstractRecord

java.lang.Object
  extended bycom.rhi.architecture.parc.AbstractRecord
All Implemented Interfaces:
Record
Direct Known Subclasses:
ListRecordSet, MapRecordSet

public abstract class AbstractRecord
extends java.lang.Object
implements Record

Record implementation providing the std error handling. Just a convenience class.

Since:
1.0
Author:
Pete McKinstry

Field Summary
static java.lang.String DEFAULT_SEPARATOR
          the default separator used between fields
 
Constructor Summary
AbstractRecord()
          default constructor
 
Method Summary
 void addError(Error error)
          Add error to this record.
 java.util.List getErrors()
          Return the list of errors attached to this record.
 boolean isErrored()
          Is the Record in an errored state.
 boolean isValid()
          Is the Record valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.rhi.architecture.parc.Record
getSourceKey, toString
 

Field Detail

DEFAULT_SEPARATOR

public static final java.lang.String DEFAULT_SEPARATOR
the default separator used between fields

See Also:
Constant Field Values
Constructor Detail

AbstractRecord

public AbstractRecord()
default constructor

Method Detail

isValid

public boolean isValid()
Is the Record valid. What isValid() really means, is up to the concrete record class. Normally, isValid() & isErrored() should return opposite values.

Specified by:
isValid in interface Record
Returns:
boolean True/False
Since:
1.0

isErrored

public boolean isErrored()
Is the Record in an errored state. What isErrored() really means is up to the concrete record class. Normally isValid() and isErrored() should return opposite boolean values.
If isErrored() returns true, the getErrors() method should return a List w/ size() > 1. If the error list is empty, isErrored should be false.

Specified by:
isErrored in interface Record
Returns:
boolean True/False
Since:
1.0

getErrors

public java.util.List getErrors()
Return the list of errors attached to this record. Allows a cummulative process for attaching errors to the record where the first error in the list is the first error found during processing.

Specified by:
getErrors in interface Record
Returns:
List - the list of errors attached to this record.
Since:
1.0

addError

public void addError(Error error)
Add error to this record.

Specified by:
addError in interface Record
Parameters:
error - msg
Since:
1.0


Copyright © 2002-2004 Robert Half International. All Rights Reserved.