| 
 | BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface RecordContext
Provides information about a record parsed by a BeanReader or Unmarshaller.  
 
 
Depending on the current state of the BeanReader or Unmarshaller, some information may not be available.
| Method Summary | |
|---|---|
|  int | getFieldCount(String fieldName)Returns the number of times the given field was present in the stream. | 
|  Map<String,Collection<String>> | getFieldErrors()Returns a Mapof all field errors. | 
|  Collection<String> | getFieldErrors(String fieldName)Returns the field errors for a given field. | 
|  String | getFieldText(String fieldName)Returns the raw text of a field found in this record. | 
|  String | getFieldText(String fieldName,
             int index)Returns the raw text of a field found in this record. | 
|  int | getLineNumber()Returns the line number of this record, or 0 if the stream does not use new lines to terminate records. | 
|  Collection<String> | getRecordErrors()Returns a collection of record level error messages. | 
|  int | getRecordLineNumber()Deprecated. use getLineNumber() | 
|  String | getRecordName()Returns the name of the record from the stream configuration. | 
|  String | getRecordText()Returns the raw text of the parsed record. | 
|  boolean | hasErrors()Returns whether this record has any record or field level errors. | 
|  boolean | hasFieldErrors()Returns whether there are one or more field level errors. | 
|  boolean | hasRecordErrors()Returns whether there are one or more record level errors. | 
| Method Detail | 
|---|
int getLineNumber()
int getRecordLineNumber()
getLineNumber()
String getRecordText()
String getRecordName()
boolean hasErrors()
boolean hasRecordErrors()
Collection<String> getRecordErrors()
Collection of record level error messagesint getFieldCount(String fieldName)
fieldName - the name of the field
String getFieldText(String fieldName)
If the field repeats in the stream, this method returns the field text for the first occurrence of the field.
fieldName - the name of the field
String getFieldText(String fieldName,
                    int index)
fieldName - the name of the field to get the text forindex - the index of the field (beginning at 0), for repeating fields
boolean hasFieldErrors()
Map<String,Collection<String>> getFieldErrors()
Map of all field errors.  The name of the field is used for the
 Map key, and the value is a Collection of field error messages.
Map of all field errorsCollection<String> getFieldErrors(String fieldName)
fieldName - the name of the field
Collection of field errors, or null if no errors were
   reported for the field| 
 | BeanIO 2.0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||