|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.agimatec.utility.fileimport.ImportController
public class ImportController
Description: Responsible to simplify the management of
multiple imports that should not run parallel.
Relies on database table 'IMPORT_CONTROL', accessed via JDBC.
User: roman.stumm
Date: 30.08.2007
Time: 13:02:51
Copyright: Agimatec GmbH
| Field Summary | |
|---|---|
protected Connection |
connection
|
protected String |
deleteById
|
protected String |
deleteByName
|
protected String |
insert
|
protected String |
lockByName
|
protected static org.apache.log4j.Logger |
log
|
protected String |
selectAll
|
protected String |
selectById
|
protected String |
selectByName
|
protected SqlUtil |
sqlUtil
|
protected String |
update
|
| Constructor Summary | |
|---|---|
ImportController(Connection connection,
SqlUtil util)
|
|
ImportController(Connection connection,
SqlUtil util,
String sequenceName)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.log4j.Logger log
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
| Constructor Detail |
|---|
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 keys| Method Detail |
|---|
public List<ImportControl> findAll()
throws SQLException
SQLException
public List<ImportControl> findByName(String importName)
throws SQLException
SQLException
public ImportControl findById(long importId)
throws SQLException
SQLException
public boolean delete(String importName)
throws SQLException
SQLException
public boolean delete(long importId)
throws SQLException
SQLException
public boolean lock(String importName)
throws SQLException
importName -
SQLException
public ImportControl join(String importName)
throws SQLException
SQLException
public long join(ImportControl imp)
throws SQLException
SQLException
public void update(ImportControl imp)
throws SQLException
SQLException
public void update(ImportControl imp,
Importer importer)
throws SQLException
SQLException
public long start(ImportControl imp)
throws SQLException
imp -
SQLException
public void end(ImportControl imp)
throws SQLException
SQLException
public void end(long importId,
Importer importer)
throws SQLException
importer - - a fileimport after import has ended
SQLException
public void end(ImportControl imp,
Importer importer)
throws SQLException
SQLExceptionpublic SqlUtil getSqlUtil()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||