All Downloads are FREE. Search and download functionalities are using the official Maven repository.

liquibase.logging.mdc.customobjects.ChangesetsUpdated Maven / Gradle / Ivy

The newest version!
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;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy