1
2
3
4
5
6
7 package org.asyrinx.joey.gen.model.rdb;
8
9 import org.asyrinx.joey.gen.model.ElementSet;
10
11 /***
12 * @author akima
13 */
14 public class Index extends ElementSet {
15
16 /***
17 *
18 */
19 public Index() {
20 super((String) null);
21 }
22
23 /***
24 *
25 */
26 public Index(Table parent) {
27 super(parent, null);
28 }
29
30 /***
31 *
32 */
33 public Index(Table parent, String name) {
34 super(parent, name);
35 }
36
37
38
39
40
41
42 public boolean isEntity() {
43 return true;
44 }
45
46
47
48
49
50
51 public void add(IndexEntry entry) {
52 super.add(entry);
53 }
54
55
56
57
58
59
60 public boolean contains(IndexEntry entry) {
61 return super.contains(entry);
62 }
63
64
65
66
67
68
69 public IndexEntry getEntry(int index) {
70 return (IndexEntry) super.getElement(index);
71 }
72
73
74
75
76
77
78 public IndexEntry getEntry(String name) {
79 return (IndexEntry) super.getElement(name);
80 }
81
82
83
84
85
86
87 public IndexEntry removeEntry(String name) {
88 return (IndexEntry) super.removeElement(name);
89 }
90
91
92
93
94
95
96 public Table getParent() {
97 return (Table) super.getParentElement();
98 }
99
100 private boolean unique = false;
101
102 /***
103 * @return Returns the unique.
104 */
105 public boolean isUnique() {
106 return unique;
107 }
108
109 /***
110 * @param unique
111 * The unique to set.
112 */
113 public void setUnique(boolean unique) {
114 this.unique = unique;
115 }
116 }