|
|||||||||||
| 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.StringListRecordProvider
Implementation of RecordProvider that provides data records for saving
from a List of Lists of Strings.
This class is used to implement the saveAsLists(*,RecordSpec,List)
methods in XmlManager.
It simply reads the next data record from the List of Lists,
maintaining an internal index of the current record.
StringListRecordProvider is designed to be subclassed. You can change the default implementation by calling the
setStringListRecordProviderClass method of
XmlManagerStore, and providing a subclass of StringListRecordProvider.
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 | |
StringListRecordProvider()
Create uninitialised for use with setData(java.util.List). |
|
StringListRecordProvider(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 StringListRecordProvider()
setData(java.util.List).
public StringListRecordProvider(List pData)
List of String[].
| Method Detail |
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()public void setData(List pData)
List of String[].
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||