1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.common.impex.model;
17
18 import java.util.List;
19
20 import javax.xml.bind.annotation.XmlAccessType;
21 import javax.xml.bind.annotation.XmlAccessorType;
22 import javax.xml.bind.annotation.XmlAttribute;
23
24 @XmlAccessorType(XmlAccessType.PROPERTY)
25 public class Index extends Constraint {
26
27 public static final Boolean DEFAULT_UNIQUE_VALUE = false;
28
29 Boolean unique = DEFAULT_UNIQUE_VALUE;
30
31
32
33
34 public Index(Index index) {
35 super(index);
36 this.unique = index.isUnique();
37 }
38
39 public Index() {
40 super();
41 }
42
43 public Index(List<String> colNames, String name) {
44 super(colNames, name);
45 }
46
47 public Index(List<String> colNames, String name, Boolean unique) {
48 this(colNames, name);
49 this.unique = unique;
50 }
51
52 @XmlAttribute
53 public Boolean isUnique() {
54 return unique;
55 }
56
57 public void setUnique(Boolean unique) {
58 this.unique = unique;
59 }
60
61 }