public class ImportController extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
connection |
protected String |
deleteById |
protected String |
deleteByName |
protected String |
insert |
protected String |
lockByName |
protected String |
selectAll |
protected String |
selectById |
protected String |
selectByName |
protected SqlUtil |
sqlUtil |
protected String |
update |
| Constructor and Description |
|---|
ImportController(Connection connection,
SqlUtil util) |
ImportController(Connection connection,
SqlUtil util,
String sequenceName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
delete(long importId)
delete the import with the given importid (primary key)
|
boolean |
delete(String importName)
delete the imports with the given name from the control table
|
void |
end(ImportControl imp)
markiert den import mit dem angeg.
|
void |
end(ImportControl imp,
Importer importer) |
void |
end(long importId,
Importer importer)
convenience method that takes infos from the importer.
|
List<ImportControl> |
findAll() |
ImportControl |
findById(long importId) |
List<ImportControl> |
findByName(String importName) |
SqlUtil |
getSqlUtil() |
long |
join(ImportControl imp) |
ImportControl |
join(String importName)
create import in database for the type and call start() after
a lock() has been aquired.
|
boolean |
lock(String importName)
aquire a lock for imports of the given name.
|
long |
start(ImportControl imp)
insert the importcontrol row into the database.
|
void |
update(ImportControl imp)
calls start() if not already done so!
|
void |
update(ImportControl imp,
Importer importer)
update rowCount, errorCount during running import.
|
protected Connection connection
protected SqlUtil sqlUtil
protected String selectAll
protected String selectByName
protected String selectById
protected String insert
protected String lockByName
protected String update
protected String deleteByName
protected String deleteById
public ImportController(Connection connection, SqlUtil util)
util - - a sequence under symbolic name "import_id" must be defined!!public ImportController(Connection connection, SqlUtil util, String sequenceName)
sequenceName - - name of sequence, to generate primary keyspublic List<ImportControl> findAll() throws SQLException
SQLExceptionpublic List<ImportControl> findByName(String importName) throws SQLException
SQLExceptionpublic ImportControl findById(long importId) throws SQLException
SQLExceptionpublic boolean delete(String importName) throws SQLException
SQLExceptionpublic boolean delete(long importId)
throws SQLException
SQLExceptionpublic boolean lock(String importName) throws SQLException
importName - SQLExceptionpublic ImportControl join(String importName) throws SQLException
SQLExceptionpublic long join(ImportControl imp) throws SQLException
SQLExceptionpublic void update(ImportControl imp) throws SQLException
SQLExceptionpublic void update(ImportControl imp, Importer importer) throws SQLException
SQLExceptionpublic long start(ImportControl imp) throws SQLException
imp - SQLExceptionpublic void end(ImportControl imp) throws SQLException
SQLExceptionpublic void end(long importId,
Importer importer)
throws SQLException
importer - - a fileimport after import has endedSQLExceptionpublic void end(ImportControl imp, Importer importer) throws SQLException
SQLExceptionpublic SqlUtil getSqlUtil()
Copyright © 2008-2016. All Rights Reserved.