public abstract class JDBCOperator extends CompositeOperator implements ConnectionSettings
ReadFromJDBC
and AbstractWriteToJDBC
.
Exposes configuration properties common to both;Modifier and Type | Method and Description |
---|---|
ConnectionFactory |
getConnectionFactory()
Returns the connection factory to be used for creating connections.
|
String |
getDriverName()
Retrieves the class name of the JDBC driver to use.
|
ErrorAction |
getErrorAction()
Retrieves the action to take if a SQL error occurs while reading data from the database.
|
List<String> |
getHostNames()
Get the list of configured database host names.
|
protected JDBCConnector |
getJDBCConnector() |
String |
getPassword()
Retrieves the password for connecting to the database.
|
int |
getSqlWarningLimit()
Retrieves the maximum number of warnings regarding SQL errors that an operator can emit.
|
String |
getTableName()
Retrieves the name of the database table to access.
|
String |
getUrl()
Retrieves the URL for connecting to the database.
|
String |
getUser()
Retrieves the user name for connecting to the database.
|
void |
setConnectionFactory(ConnectionFactory connectionFactory)
Sets the connection factory to be used for creating connections.
|
void |
setDriverName(String driverName)
Sets the class name of the JDBC driver to use, for example:
"sun.jdbc.odbc.JdbcOdbcDriver" . |
void |
setErrorAction(ErrorAction errorAction)
Sets the action to take if a SQL error occurs while reading data from the database.
|
void |
setHostNames(List<String> hostNames)
Set the list of database host names that can be used to execute queries.
|
void |
setHostNames(String... hostNames)
Set the list of database host names that can be used to execute queries.
|
protected void |
setJDBCConnector(JDBCConnector jdbcConnector) |
void |
setPassword(String password)
Sets the password for connecting to the database.
|
void |
setSqlWarningLimit(int sqlWarningLimit)
Set the maximum number of warnings regarding SQL errors that an operator can emit.
|
void |
setTableName(String tableName)
Sets the name of the database table to access.
|
void |
setUrl(String url)
Sets the URL for connecting to the database, for example:
jdbc:odbc:SampleTest . |
void |
setUser(String user)
Sets the user name for connecting to the database.
|
compose
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
public final String getDriverName()
getDriverName
in interface ConnectionSettings
public final void setDriverName(String driverName)
"sun.jdbc.odbc.JdbcOdbcDriver"
.driverName
- the class name of the JDBC driver to usepublic final String getPassword()
getPassword
in interface ConnectionSettings
public final void setPassword(String password)
password
- the password for connecting to the databasepublic final String getUrl()
getUrl
in interface ConnectionSettings
public void setUrl(String url)
jdbc:odbc:SampleTest
.url
- the URL for connecting to the databasepublic final String getUser()
getUser
in interface ConnectionSettings
public final void setUser(String user)
user
- the user name for connecting to the databasepublic final String getTableName()
public final void setTableName(String tableName)
WriteToJDBC
, but optional for ReadFromJDBC
,
since ReadFromJDBC.setSelectStatement(String)
may be used instead.tableName
- the name of the database table to accesspublic final ErrorAction getErrorAction()
public final void setErrorAction(ErrorAction errorAction)
The default value is ErrorAction.ABORT
.
errorAction
- the action to take if a SQL error occurspublic final int getSqlWarningLimit()
public final void setSqlWarningLimit(int sqlWarningLimit)
#errorAction
is ErrorAction.WARN
.
The default value is 100
.
sqlWarningLimit
- the maximum number of warnings regarding SQL errors that an operator can emitpublic final ConnectionFactory getConnectionFactory()
DefaultConnectionFactory
.public final void setConnectionFactory(ConnectionFactory connectionFactory)
DefaultConnectionFactory
.connectionFactory
- the connection factory to be used for creating connections.public List<String> getHostNames()
public void setHostNames(List<String> hostNames)
hostNames
- list of database host namespublic void setHostNames(String... hostNames)
hostNames
- list of database host namesprotected JDBCConnector getJDBCConnector()
protected void setJDBCConnector(JDBCConnector jdbcConnector)
Copyright © 2020 Actian Corporation. All rights reserved.