View Javadoc

1   /*
2    * joey-gen and its relative products are published under the terms
3    * of the Apache Software License.
4    * 
5    * Created on 2004/08/10 17:15:16
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       * (non-Javadoc)
39       * 
40       * @see org.asyrinx.joey.gen.model.ElementSet#isEntity()
41       */
42      public boolean isEntity() {
43          return true;
44      }
45  
46      /*
47       * (non-Javadoc)
48       * 
49       * @see org.asyrinx.joey.gen.model.ElementSet#add(org.asyrinx.joey.gen.model.Element)
50       */
51      public void add(IndexEntry entry) {
52          super.add(entry);
53      }
54  
55      /*
56       * (non-Javadoc)
57       * 
58       * @see org.asyrinx.joey.gen.model.ElementSet#contains(org.asyrinx.joey.gen.model.Element)
59       */
60      public boolean contains(IndexEntry entry) {
61          return super.contains(entry);
62      }
63  
64      /*
65       * (non-Javadoc)
66       * 
67       * @see org.asyrinx.joey.gen.model.ElementSet#getElement(int)
68       */
69      public IndexEntry getEntry(int index) {
70          return (IndexEntry) super.getElement(index);
71      }
72  
73      /*
74       * (non-Javadoc)
75       * 
76       * @see org.asyrinx.joey.gen.model.ElementSet#get(java.lang.String)
77       */
78      public IndexEntry getEntry(String name) {
79          return (IndexEntry) super.getElement(name);
80      }
81  
82      /*
83       * (non-Javadoc)
84       * 
85       * @see org.asyrinx.joey.gen.model.ElementSet#remove(java.lang.String)
86       */
87      public IndexEntry removeEntry(String name) {
88          return (IndexEntry) super.removeElement(name);
89      }
90  
91      /*
92       * (non-Javadoc)
93       * 
94       * @see org.asyrinx.joey.gen.model.Element#getParentElement()
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 }