public class Importer
extends java.lang.Object
Constructor and Description |
---|
Importer()
Default constructor.
|
Importer(javax.sql.DataSource dataSource)
Creates a new Importer with all mandatory attributes.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(java.io.File inputScript)
Imports a SQL-script-file.
|
javax.sql.DataSource |
getDataSource()
Gets the data-source to connect with the database.
|
java.lang.Integer |
getIsolationLevel()
Gets IsolationLevel.
|
int |
getNumberOfThreads()
Gets number of threads.
|
boolean |
getTransactional()
If
true , import rows in a single transaction. |
void |
setDataSource(javax.sql.DataSource dataSource)
Sets the data-source to connect with the database.
|
void |
setIsolationLevel(java.lang.Integer isolationLevel)
Sets IsolationLevel.
|
void |
setNumberOfThreads(int numberOfThreads)
Sets number of threads.
|
void |
setTransactional(boolean transactional)
If
true , Import rows in a single transaction. |
public Importer()
public Importer(javax.sql.DataSource dataSource)
dataSource
- the data-source to connect with the databasepublic void execute(java.io.File inputScript) throws java.io.IOException, java.sql.SQLException
inputScript
- the SQL-script-filejava.io.IOException
java.sql.SQLException
public javax.sql.DataSource getDataSource()
public void setDataSource(javax.sql.DataSource dataSource)
dataSource
- the data-source to connect with the databasepublic int getNumberOfThreads()
public void setNumberOfThreads(int numberOfThreads)
numberOfThreads
- number of threads (default is 1)public boolean getTransactional()
true
, import rows in a single transaction. (default is true)true
if Import rows in a single transactionpublic void setTransactional(boolean transactional)
true
, Import rows in a single transaction. (default is true)transactional
- true
if import rows in a single transactionpublic java.lang.Integer getIsolationLevel()
Connection.setTransactionIsolation(int)
public void setIsolationLevel(java.lang.Integer isolationLevel)
Connection.setTransactionIsolation(int)