public class BasicStreamingDataset extends AbstractDataset implements StreamingDatasetWriter
_columnNamesLowercase, columnNames, columnTypes, qualityCodes| Constructor and Description |
|---|
BasicStreamingDataset() |
BasicStreamingDataset(java.util.List<java.lang.String> columnNames,
java.util.List<java.lang.Class<?>> columnTypes) |
BasicStreamingDataset(java.sql.ResultSet rs)
Creates a dataset by streaming the results of a JDBC ResultSet
|
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Notifies the writer to close- all data has been written.
|
void |
finishWithError(java.lang.Exception e)
Finishes the stream while indicating an error occurred.
|
QualityCode[][] |
getBulkQualityCodes() |
java.lang.Exception |
getError() |
QualityCode |
getQualityAt(int row,
int col)
Returns the quality of the value at the given location.
|
int |
getRowCount()
Return the number of rows in this dataset
|
java.lang.Object |
getValueAt(int row,
int col)
Returns the value in the dataset at the given location.
|
void |
initialize(java.lang.String[] columnNames,
java.lang.Class<?>[] columnTypes,
boolean supportsQuality,
int expectedRows)
Initializes the streaming dataset with important information, primarily the column names and types.
|
void |
printToConsole() |
void |
write(java.lang.Object[] data,
QualityCode[] quality)
Writes a row with the given data.
|
getAsXML, getColumnCount, getColumnIndex, getColumnName, getColumnNames, getColumnType, getColumnTypes, getPrimitiveValueAt, getValueAt, setColumnNames, setColumnTypes, setDirtyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbinarySearch, getColumnAsListpublic BasicStreamingDataset()
public BasicStreamingDataset(java.util.List<java.lang.String> columnNames,
java.util.List<java.lang.Class<?>> columnTypes)
public BasicStreamingDataset(java.sql.ResultSet rs)
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.lang.Exception getError()
public void initialize(java.lang.String[] columnNames,
java.lang.Class<?>[] columnTypes,
boolean supportsQuality,
int expectedRows)
StreamingDatasetWriterinitialize in interface StreamingDatasetWriterexpectedRows - -1 if not known, otherwise the number of rows that will be in the dataset.public void write(java.lang.Object[] data,
QualityCode[] quality)
StreamingDatasetWriterwrite in interface StreamingDatasetWriterpublic void finish()
StreamingDatasetWriterfinish in interface StreamingDatasetWriterpublic void finishWithError(java.lang.Exception e)
StreamingDatasetWriterfinishWithError in interface StreamingDatasetWriterpublic QualityCode getQualityAt(int row, int col)
DatasetgetQualityAt in interface DatasetgetQualityAt in class AbstractDatasetpublic int getRowCount()
DatasetgetRowCount in interface Datasetpublic java.lang.Object getValueAt(int row,
int col)
DatasetgetValueAt in interface Datasetpublic void printToConsole()
public QualityCode[][] getBulkQualityCodes()
getBulkQualityCodes in class AbstractDataset