public class Importer extends Object
| Constructor and Description |
|---|
Importer()
Default constructor.
|
Importer(DataSource dataSource)
Creates a new Importer with all mandatory attributes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute(File inputScript)
Imports a SQL-script-file.
|
DataSource |
getDataSource()
Gets the data-source to connect with the database.
|
int |
getNumberOfThreads()
Gets number of threads.
|
boolean |
getTransactional()
If
true, Import rows in a single transaction. |
void |
setDataSource(DataSource dataSource)
Sets the data-source to connect with the database.
|
void |
setNumberOfThreads(int numberOfThreads)
Sets number of threads.
|
void |
setTransactional(boolean transactional)
If
true, Import rows in a single transaction. |
public Importer()
public Importer(DataSource dataSource)
dataSource - the data-source to connect with the databasepublic void execute(File inputScript) throws IOException, SQLException
inputScript - the SQL-script-fileIOExceptionSQLExceptionpublic DataSource getDataSource()
public void setDataSource(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 transaction