Class CopyToBusinessUnitChange
java.lang.Object
ch.tocco.nice2.dbrefactoring.impl.liquibase.CopyToBusinessUnitChange
- All Implemented Interfaces:
liquibase.change.custom.CustomChange
,liquibase.change.custom.CustomTaskChange
public class CopyToBusinessUnitChange
extends Object
implements liquibase.change.custom.CustomTaskChange
Used to copy entities from the one business unit to another
Parameters:
* sourceBusinessUnitId (default = business unit with the lowest pk)
* targetBusinessUnitId business unit id to copy to
* tableName Name of the database table
* businessUnitFkColumn fk of business unit relation (default = fk_business_unit)
* pkColumn pk of your table (default = pk)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(liquibase.database.Database database) void
setBusinessUnitFkColumn
(@Nullable String businessUnitFkColumn) void
setFileOpener
(liquibase.resource.ResourceAccessor resourceAccessor) void
setPkColumn
(@Nullable String pkColumn) void
setSourceBusinessUnitId
(@Nullable String sourceBusinessUnitId) void
setTableName
(String tableName) void
setTargetBusinessUnitId
(String targetBusinessUnitId) void
setUp()
liquibase.exception.ValidationErrors
validate
(liquibase.database.Database database)
-
Constructor Details
-
CopyToBusinessUnitChange
public CopyToBusinessUnitChange()
-
-
Method Details
-
execute
public void execute(liquibase.database.Database database) throws liquibase.exception.CustomChangeException - Specified by:
execute
in interfaceliquibase.change.custom.CustomTaskChange
- Throws:
liquibase.exception.CustomChangeException
-
getConfirmationMessage
- Specified by:
getConfirmationMessage
in interfaceliquibase.change.custom.CustomChange
-
setUp
public void setUp() throws liquibase.exception.SetupException- Specified by:
setUp
in interfaceliquibase.change.custom.CustomChange
- Throws:
liquibase.exception.SetupException
-
setFileOpener
public void setFileOpener(liquibase.resource.ResourceAccessor resourceAccessor) - Specified by:
setFileOpener
in interfaceliquibase.change.custom.CustomChange
-
validate
public liquibase.exception.ValidationErrors validate(liquibase.database.Database database) - Specified by:
validate
in interfaceliquibase.change.custom.CustomChange
-
getSourceBusinessUnitId
-
setSourceBusinessUnitId
-
getTargetBusinessUnitId
-
setTargetBusinessUnitId
-
getTableName
-
setTableName
-
getBusinessUnitFkColumn
-
setBusinessUnitFkColumn
-
getPkColumn
-
setPkColumn
-