|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ricebridge.xmlman.RecordProviderSupport
com.ricebridge.xmlman.StringArrayRecordProvider
Simple implementation of RecordProvider that provides data records for saving
from a List of String[] arrays.
This class is used to implement the save(*,RecordSpec,List)
methods in XmlManager.
It simply reads the next data record from the List of String[] arrays,
maintaining an internal index of the current record.
StringArrayRecordProvider is designed to be subclassed. You can change the default implementation by calling the
setStringArrayRecordProviderClass method of
XmlManagerStore, and providing a subclass of StringArrayRecordProvider.
XmlManagerStore can be accessed using XmlManager.getXmlManagerStore().
The Source Code of this Java class is available under a BSD-style license.
| Field Summary | |
protected List |
iData
List of String[]. |
protected int |
iRecordIndex
Index of current record in List. |
| Fields inherited from class com.ricebridge.xmlman.RecordProviderSupport |
iFieldNames |
| Constructor Summary | |
StringArrayRecordProvider()
Create uninitialised for use with setData(java.util.List). |
|
StringArrayRecordProvider(List pData)
Create with data records as List of String[]. |
|
| Method Summary | |
protected boolean |
hasNextRecordImpl()
Check if there are any more records. |
protected String[] |
nextRecordImpl()
Return next data record as a String[] array. |
void |
setData(List pData)
Set data records to save as List of String[]. |
protected void |
startProcessImpl()
Start the saving process. |
| Methods inherited from class com.ricebridge.xmlman.RecordProviderSupport |
endProcess, endProcessImpl, hasNextRecord, nextRecord, setFieldNames, setFieldNamesImpl, setXmlSpec, setXmlSpecImpl, startProcess |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected List iData
List of String[].
protected int iRecordIndex
List.
| Constructor Detail |
public StringArrayRecordProvider()
setData(java.util.List).
public StringArrayRecordProvider(List pData)
List of String[].
| Method Detail |
public void setData(List pData)
List of String[].
protected void startProcessImpl()
startProcessImpl in class RecordProviderSupportRecordProviderSupport.startProcess(),
RecordProvider.startProcess()protected boolean hasNextRecordImpl()
hasNextRecordImpl in class RecordProviderSupportRecordProviderSupport.hasNextRecord(),
RecordProvider.hasNextRecord()protected String[] nextRecordImpl()
String[] array.
nextRecordImpl in class RecordProviderSupportRecordProviderSupport.nextRecord(),
RecordProvider.nextRecord()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||