org.jSyncManager.API.Conduit.Tools

Class DateBookDBCSV


public class DateBookDBCSV
extends DLPRecordCSV

This is a synchronization JConduit for a CSV document from the DateBookDB database.

The records are repeated in the case of the record.hasExceptions(), because the CSV document cannot be more than 2-dimensional. Therefore, the complete record is repeated for each exception.

When the document is read into the DateBookCSV object, a check is made on the next record through the exceptionno column, to see if the next record should be included as an exception within the first record of its type. If the exceptionno column is 0, a new record is begun.

See Also:
JSCSVCell, JSCSVDocument, DLPRecordCSV

Field Summary

static String
CSVNAME
Name of CSV record type.
DateBookRecord
record
Transient copy of DateBookRecord input.

Fields inherited from class org.jSyncManager.API.Conduit.Tools.JSCSVDocument

DATATYPE_ROW, DLPRECORD_COLS, TITLE_ROW

Constructor Summary

DateBookDBCSV()
Create new default, empty DateBookDBCSV
DateBookDBCSV(File document)
Create new DateBookDBSCSV from File document.
DateBookDBCSV(InputStreamReader inputfile)
Create new DateBookDBCSV with InputStreamReader stream input.
DateBookDBCSV(DateBookRecord rec)
Create new DateBookDBCSV with DateBookRecord input.

Method Summary

void
insertRecord(DateBookRecord rec)
Insert record into the CSV document.
int
insertTitles(DateBookRecord rec)
Insert titles columns from the DateBookRecord.
int
insertTypes(DateBookRecord rec)
Insert column data types.
void
readDocument(InputStreamReader inputfile)
Read JSCSVDocument document contents into the CSV document.

Methods inherited from class org.jSyncManager.API.Conduit.Tools.DLPRecordCSV

insertRecord, insertTitles, insertTypes, readDocument, readDocument

Methods inherited from class org.jSyncManager.API.Conduit.Tools.JSCSVDocument

elementAt, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, escape, getCell, getDocument, getHeaderrows, getReader, getRowNo, getSeparator, getValue, isShowtitles, parse, parse, parse, parse, parseRow, parseTitleRow, parseTypeRow, readBooleanCell, readByteArrayCell, readByteCell, readCalendarCell, readCharArrayCell, readCharCell, readDocument, readDoubleArrayCell, readDoubleCell, readFloatArrayCell, readFloatCell, readIntArrayCell, readIntCell, readLongArrayCell, readLongCell, readStringArrayCell, readStringCell, setDocument, setElementAt, setElementAt, setHeaderrows, setReader, setReader, setReader, setSeparator, setShowtitles, writeDataRow, writeDocument, writeDocument

Field Details

CSVNAME

public static String CSVNAME
Name of CSV record type.

record

public DateBookRecord record
Transient copy of DateBookRecord input.

Constructor Details

DateBookDBCSV

public DateBookDBCSV()
Create new default, empty DateBookDBCSV

DateBookDBCSV

public DateBookDBCSV(File document)
            throws java.io.IOException
Create new DateBookDBSCSV from File document.
Parameters:
document - File input.

DateBookDBCSV

public DateBookDBCSV(InputStreamReader inputfile)
            throws java.io.IOException
Create new DateBookDBCSV with InputStreamReader stream input.
Parameters:
inputfile - InputStreamReader input stream.

DateBookDBCSV

public DateBookDBCSV(DateBookRecord rec)
Create new DateBookDBCSV with DateBookRecord input.
Parameters:
rec - DateBookRecord

Method Details

insertRecord

public void insertRecord(DateBookRecord rec)
Insert record into the CSV document.
Parameters:
rec - DateBookRecord input.

insertTitles

public int insertTitles(DateBookRecord rec)
Insert titles columns from the DateBookRecord.
Parameters:
rec - DateBookRecord input.
Returns:
Number of columns in the record.

insertTypes

public int insertTypes(DateBookRecord rec)
Insert column data types.
Parameters:
rec - DateBookRecord input.
Returns:
Number of columns in the record.

readDocument

public void readDocument(InputStreamReader inputfile)
            throws java.io.IOException
Read JSCSVDocument document contents into the CSV document.
Overrides:
readDocument in interface DLPRecordCSV
Parameters:
inputfile - InputStreamReader stream input.