|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jmonks.batch.io.RecordSpec
RecordSpec represents the <record-spec> element in file spec. Record spec specifies the format of the record in the form of multiple field specs and contains the attribute helps in identifying the type of record and so. Each record spec contains zero or more field specs based on the file type.
Every record-spec element contains record-type attribute
specifies the kind of record it is. Most of these values will be defined
in RecordType class and additional values can be added by extending the
RecordType. The record-type values should be unique across one file spec.
Here is a sample record-spec configuration.
<record-spec record-type="DETAIL"> <field-spec field-name="consumer-id"> </field-spec> </record-spec>
Field Summary | |
protected java.util.List |
fieldSpecList
Holds all the field spec objects. |
static java.lang.String |
RECORD_SPEC_TAG_NAME
Constant defines the record spec tag name. |
static java.lang.String |
RECORD_TYPE_ATTRIB_NAME
Constant defines the record type attribute name. |
protected RecordType |
recordType
Holds the type of the record this spec is representing. |
Constructor Summary | |
protected |
RecordSpec(RecordType recordType)
Constructs the RecordSpec object by accepting the RecordType. |
Method Summary | |
protected boolean |
addFieldSpec(FieldSpec fieldSpec)
Adds the given field spec object to the record spec. |
java.util.List |
getFieldSpecs()
Gets the field spec objects as a list. |
RecordType |
getRecordType()
Returns the record type of this record spec. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected RecordType recordType
protected java.util.List fieldSpecList
public static final java.lang.String RECORD_SPEC_TAG_NAME
public static final java.lang.String RECORD_TYPE_ATTRIB_NAME
Constructor Detail |
protected RecordSpec(RecordType recordType)
recordType
- Type of the record.Method Detail |
protected boolean addFieldSpec(FieldSpec fieldSpec)
fieldSpec
- Field spec object to be added.
java.lang.IllegalArgumentException
- If given field spec is null.
FileSpecException
- If multiple field specs configured with same field name.public java.util.List getFieldSpecs()
public RecordType getRecordType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |