01: package liquibase.database.structure;
02:
03: import java.util.Arrays;
04: import java.util.HashSet;
05: import java.util.Set;
06:
07: public class UniqueConstraint {
08: private String name;
09: private Table table;
10: private Set<Column> columns = new HashSet<Column>();
11:
12: public UniqueConstraint(String name, Table table, Column... columns) {
13: this .name = name;
14: this .table = table;
15: this .columns.addAll(Arrays.asList(columns));
16: }
17:
18: public String getName() {
19: return name;
20: }
21:
22: public Table getTable() {
23: return table;
24: }
25:
26: public Set<Column> getColumns() {
27: return columns;
28: }
29: }
|