public class RecStreamJDBCOutputHandler extends Object implements IOutputHandler, IStreaming
IStreaming.IStreamCloser, IStreaming.IStreamProcessor<T>
Modifier and Type | Field and Description |
---|---|
static char |
ESCAPE_CHAR_DEFAULT |
static char |
VALUE_SEPARATOR_DEFAULT |
Constructor and Description |
---|
RecStreamJDBCOutputHandler(boolean allowMultipleValuesPerAttribute,
String entity,
String[] attributes,
boolean includeId,
int initId,
RecStreamOutputHandler.IFilter<String> valFilter,
RecStreamOutputHandler.IFilter<Record> recFilter,
String driver,
String dbUrl,
String dbUser,
String dbPsw,
String schemaName,
String tableName,
boolean override,
int batchSize) |
RecStreamJDBCOutputHandler(String wrapperId,
boolean allowMultipleValuesPerAttribute,
String entity,
String[] attributes,
boolean includeId,
int initId,
RecStreamOutputHandler.IFilter<String> valFilter,
RecStreamOutputHandler.IFilter<Record> recFilter,
char valueSeparator,
char escapeChar,
String driver,
String dbUrl,
String dbUser,
String dbPsw,
String schemaName,
String tableName,
boolean override,
int batchSize) |
RecStreamJDBCOutputHandler(String wrapperId,
boolean allowMultipleValuesPerAttribute,
String entity,
String[] attributes,
boolean includeId,
int initId,
RecStreamOutputHandler.IFilter<String> valFilter,
RecStreamOutputHandler.IFilter<Record> recFilter,
String driver,
String dbUrl,
String dbUser,
String dbPsw,
String schemaName,
String tableName,
boolean override,
int batchSize) |
Modifier and Type | Method and Description |
---|---|
Record |
getLastRecord()
Get last received record
|
Integer |
getLastRecordId()
Get last received record's ID
|
List<Throwable> |
getOuterExceptions() |
String |
getOuterExceptionStackTracesAsString() |
IStreaming.IStreamCloser |
getStreamCloser() |
String |
getWrapperId() |
boolean |
hasOuterException() |
boolean |
isEndNodeReceived() |
void |
processNode(OXPathExtractionNode node)
The OXPath engine invokes this method to output extraction nodes.
|
void |
receiveOuterException(Throwable e)
This method is called by the OXPath engine if the exception affecting the output has been received.
|
public static final char VALUE_SEPARATOR_DEFAULT
public static final char ESCAPE_CHAR_DEFAULT
public RecStreamJDBCOutputHandler(boolean allowMultipleValuesPerAttribute, String entity, String[] attributes, boolean includeId, int initId, RecStreamOutputHandler.IFilter<String> valFilter, RecStreamOutputHandler.IFilter<Record> recFilter, String driver, String dbUrl, String dbUser, String dbPsw, String schemaName, String tableName, boolean override, int batchSize)
allowMultipleValuesPerAttribute
- true: multiple values are allowed per attributeentity
- the name of the entityattributes
- attributes to be serialisedincludeId
- true: the id is to be included into the resultinitId
- initial id used for recordsvalFilter
- a function for filtering values (can be null)recFilter
- a function for filtering records (can be null)driver
- JDBC driver (class)dbUrl
- JDBC database URLdbUser
- database userdbPsw
- database passwordschemaName
- schema nametableName
- table nameoverride
- true: able will be re-createdbatchSize
- minimal number of queries to be committed at oncepublic RecStreamJDBCOutputHandler(String wrapperId, boolean allowMultipleValuesPerAttribute, String entity, String[] attributes, boolean includeId, int initId, RecStreamOutputHandler.IFilter<String> valFilter, RecStreamOutputHandler.IFilter<Record> recFilter, String driver, String dbUrl, String dbUser, String dbPsw, String schemaName, String tableName, boolean override, int batchSize)
wrapperId
- allowMultipleValuesPerAttribute
- true: multiple values are allowed nullper attributeentity
- the name of the entityattributes
- attributes to be serialisedincludeId
- true: the id is to be included into the resultinitId
- initial id used for recordsvalFilter
- a function for filtering values (can be null)recFilter
- a function for filtering records (can be null)driver
- JDBC driver (class)dbUrl
- JDBC database URLdbUser
- database userdbPsw
- database passwordschemaName
- schema nametableName
- table nameoverride
- true: able will be re-createdbatchSize
- minimal number of queries to be committed at oncepublic RecStreamJDBCOutputHandler(String wrapperId, boolean allowMultipleValuesPerAttribute, String entity, String[] attributes, boolean includeId, int initId, RecStreamOutputHandler.IFilter<String> valFilter, RecStreamOutputHandler.IFilter<Record> recFilter, char valueSeparator, char escapeChar, String driver, String dbUrl, String dbUser, String dbPsw, String schemaName, String tableName, boolean override, int batchSize)
wrapperId
- allowMultipleValuesPerAttribute
- true: multiple values are allowed per attributeentity
- the name of the entityattributes
- attributes to be serialisedincludeId
- true: the id is to be included into the resultinitId
- initial id used for recordsvalFilter
- a function for filtering values (can be null)recFilter
- a function for filtering records (can be null)valueSeparator
- character to join values of the entity's attributeescapeChar
- escape character used in string join operationdriver
- JDBC driver (class)dbUrl
- JDBC database URLdbUser
- database userdbPsw
- database passwordschemaName
- schema nametableName
- table nameoverride
- true: able will be re-createdbatchSize
- minimal number of queries to be committed at oncepublic Record getLastRecord()
public Integer getLastRecordId()
public void processNode(OXPathExtractionNode node)
IAbstractOutputHandler
<result>
node, the root. The last node is the "end node".processNode
in interface IAbstractOutputHandler
public void receiveOuterException(Throwable e)
IAbstractOutputHandler
receiveOuterException
in interface IAbstractOutputHandler
public boolean hasOuterException()
hasOuterException
in interface IAbstractOutputHandler
public boolean isEndNodeReceived()
isEndNodeReceived
in interface IOutputHandler
public String getWrapperId()
getWrapperId
in interface IOutputHandler
public List<Throwable> getOuterExceptions()
getOuterExceptions
in interface IOutputHandler
public String getOuterExceptionStackTracesAsString()
getOuterExceptionStackTracesAsString
in interface IOutputHandler
public IStreaming.IStreamCloser getStreamCloser()
getStreamCloser
in interface IStreaming
Copyright © 2020 OXPath Team. All rights reserved.