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

liquibase.statement.UniqueConstraint Maven / Gradle / Ivy

There is a newer version: 3.6.2.5.inovus
Show newest version
package liquibase.statement;

import liquibase.structure.core.Index;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class UniqueConstraint implements ColumnConstraint {
    private String constraintName;
    private List columns = new ArrayList<>();

    private Index backingIndex;

    public UniqueConstraint() {

    }

    public UniqueConstraint(String constraintName) {
        this.constraintName = constraintName;
    }

    public UniqueConstraint addColumns(String... columns) {
        this.columns.addAll(Arrays.asList(columns));

        return this;
    }

    public String getConstraintName() {
        return constraintName;
    }

    public void setConstraintName(String constraintName) {
        this.constraintName = constraintName;
    }

    public List getColumns() {
        return columns;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy