P
- the generic DataSetConnectorParams typeR
- the generic ConnectorResult typepublic interface DataSetConnector<P extends DataSetConnectorParams,R extends ConnectorResult>
extends Serializable
DataSet
must implement
DataSetConnector
interface. Examples: TextConnector,
XmlConnector, SqlConnector, etc.DataSetConnectorParams
Modifier and Type | Method and Description |
---|---|
boolean |
canRead()
Checks if connector can read data.
|
boolean |
canWrite()
Checks if connector can write data.
|
void |
cleanUp(P params,
DataSet dataSet,
Driver driver)
Cleans up after DataSetConnector populated or persisted DataSet.
|
P |
getDataSetConnectorParams()
Gets the DataSetConnectorParams.
|
String |
getExt()
Gets the file ext.
|
String |
getName()
Gets the name.
|
String |
initQueryLabel()
The init query label.
|
void |
inlinePersist(P params,
DataSet dataSet,
Driver driver,
DataSetRecord record,
int row,
int records)
Persists data set row.
|
boolean |
isFileConnector()
Checks if this is a connector to the file based data source.
|
boolean |
isTextFormat()
Checks if this is a connector for the text-based data format, such as
JOSN, XML, etc.
|
ConnectorResult |
persist(P params,
DataSet dataSet,
Driver driver)
Persists data set.
|
ConnectorResult |
populate(P params,
DataSet dataSet,
Driver driver)
Populates data set.
|
void |
postPersist(P params,
DataSet dataSet,
Driver driver)
Called when DataSetConnector finished persisting data set.
|
void |
prePersist(P params,
DataSet dataSet,
Driver driver)
Called when DataSetConnector starts persisting data set.
|
boolean |
supportsNested()
Supports nested.
|
boolean |
supportsReadStreaming()
Supports read streaming.
|
default boolean |
supportsReordering(P params)
Supports reordering of the fields.
|
boolean |
supportsWorksheets()
Checks if connector supports worksheets.
|
boolean |
supportsWriteStreaming()
Supports write streaming.
|
String |
testConnection(ConnectionParams connectionParams)
Tests the connection.
|
ConnectorResult |
writeMetaData(P params,
DataSet dataSet,
Driver driver)
Writes meta data.
|
boolean supportsReadStreaming()
boolean supportsWriteStreaming()
boolean supportsNested()
boolean canRead()
boolean canWrite()
void cleanUp(P params, DataSet dataSet, Driver driver) throws Exception
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorP getDataSetConnectorParams()
String getExt()
String getName()
void inlinePersist(P params, DataSet dataSet, Driver driver, DataSetRecord record, int row, int records) throws Exception
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverrecord
- the recordrow
- the rowrecords
- the total number of recordsException
- in case of any errorboolean isFileConnector()
boolean isTextFormat()
ConnectorResult persist(P params, DataSet dataSet, Driver driver) throws Exception
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorConnectorResult populate(P params, DataSet dataSet, Driver driver) throws Exception
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorvoid postPersist(P params, DataSet dataSet, Driver driver) throws Exception
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorvoid prePersist(P params, DataSet dataSet, Driver driver) throws Exception
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorString testConnection(ConnectionParams connectionParams) throws Exception
connectionParams
- the connection paramsException
- the exception in case of any errorConnectorResult writeMetaData(P params, DataSet dataSet, Driver driver) throws Exception
params
- the DataSetConnectorParamsdataSet
- the data setdriver
- the driverException
- in case of any errorString initQueryLabel()
boolean supportsWorksheets()
default boolean supportsReordering(P params)
params
- the paramsCopyright © 2010-2020 Toolsverse. All Rights Reserved.