Class ScanService
java.lang.Object
overit.geocall.basic.bl.encryption.ScanService
This service allows to run the
DAO.scan(CommandContext, PoolKit, DBScanner) command on any table and any pool name.
It is up to the DBScanner implementation define what the scan method does.
The commit command will not run at the end of the DAO.scan(CommandContext, PoolKit, DBScanner) method by default.
Use the enableCommit() method to enable it.-
Constructor Summary
ConstructorsConstructorDescriptionScanService(String pool, String table, List<String> columns) Constructor of the class. -
Method Summary
Modifier and TypeMethodDescriptionvoidDisable the commit command at the end of therun(DBScanner, PoolKit)methodvoidEnable the commit command at the end of therun(DBScanner, PoolKit)methodvoidRun theDAO.scan(CommandContext, PoolKit, DBScanner)command after to create the instance ofDAOdynamically created on thetableandpoolname defined in the constructor.
-
Constructor Details
-
ScanService
Constructor of the class.- Parameters:
pool- name of the pooltable- name of the table to execute the scan commandcolumns- list of the columns to be scanned
-
-
Method Details
-
enableCommit
public void enableCommit()Enable the commit command at the end of therun(DBScanner, PoolKit)method -
disableCommit
public void disableCommit()Disable the commit command at the end of therun(DBScanner, PoolKit)method -
run
public void run(DBScanner dbScanner, PoolKit poolKit) throws SQLException, DAException, DAValidateException Run theDAO.scan(CommandContext, PoolKit, DBScanner)command after to create the instance ofDAOdynamically created on thetableandpoolname defined in the constructor. The commit command will not run at the end of this method by default. Use theenableCommit()method to enable it.- Parameters:
dbScanner- theDBScannerimplementation that define what it should be done in theDAO.scan(CommandContext, PoolKit, DBScanner)command.poolKit- thePoolKitto use to run theDAO.scan(CommandContext, PoolKit, DBScanner)command.- Throws:
SQLException- If there is an error in the SQL SQLException is thrownDAException- if an error occurs in the data access phaseDAValidateException- if an error occurs during the validation of the data
-