liquibase.logging.mdc.customobjects.ChangesetsUpdated Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of liquibase-core Show documentation
Show all versions of liquibase-core Show documentation
Liquibase is a tool for managing and executing database changes.
package liquibase.logging.mdc.customobjects;
import liquibase.changelog.ChangeSet;
import liquibase.logging.mdc.CustomMdcObject;
import java.util.ArrayList;
import java.util.List;
/**
* Custom MDC object to represent the changesets that were deployed during an update event.
*/
public class ChangesetsUpdated implements CustomMdcObject {
private int changesetCount;
private List changeset;
/**
* Constructor for service locator.
*/
public ChangesetsUpdated() {
}
public ChangesetsUpdated(List deployedChangeSets) {
this.changesetCount = deployedChangeSets.size();
this.changeset = new ArrayList<>(this.changesetCount);
for (ChangeSet deployedChangeSet : deployedChangeSets) {
this.changeset.add(MdcChangesetExtended.fromChangeset(deployedChangeSet));
}
}
public int getChangesetCount() {
return changesetCount;
}
public void setChangesetCount(int changesetCount) {
this.changesetCount = changesetCount;
}
public List getChangeset() {
return changeset;
}
public void setChangeset(List changeset) {
this.changeset = changeset;
}
}