Class FixCountersFragment
java.lang.Object
ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
ch.tocco.nice2.dbrefactoring.impl.install.fragments.FixCountersFragment
- All Implemented Interfaces:
InstallFragment
this fragment fixes all counters of all entity models
counters need to be of type "counter" to be considered
fixing consists of the following actions:
- sets new counters on entities (can only happen with faulty databases, counters are not-null and unique)
- deletes counters which have a businessunit but should not have one, and the other way around
- deletes duplicate counters, meaning the same field, entity and businessunit (if entity model is linked to businessunit)
- creates counters that should exist, but do not
- set counters to correct count
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
JdbcHelper.SqlFunction<A,
B> -
Constructor Summary
ConstructorDescriptionFixCountersFragment
(Context context, BusinessUnitManager businessUnitManager, QueryBuilderFactory queryBuilderFactory, NiceDataModel dataModel, DataSource dataSource, SecurityManager securityManager) -
Method Summary
Modifier and TypeMethodDescriptioninstall
(InstallParameters params) Executes this fragments install routine and returns a report.Methods inherited from class ch.tocco.nice2.dbrefactoring.spi.liquibase.JdbcHelper
ddlStatement, tableExists, uniqueIndexExists, withConnection, withResultSet, withStatement
-
Constructor Details
-
FixCountersFragment
public FixCountersFragment(Context context, BusinessUnitManager businessUnitManager, QueryBuilderFactory queryBuilderFactory, NiceDataModel dataModel, DataSource dataSource, SecurityManager securityManager)
-
-
Method Details
-
install
Description copied from interface:InstallFragment
Executes this fragments install routine and returns a report. This will affect all modules.- Specified by:
install
in interfaceInstallFragment
- Returns:
- a report for this install fragment
-