1
2
3
4
5
6
7 package org.asyrinx.joey.gen.model.java;
8
9 import org.asyrinx.joey.gen.model.ElementSet;
10
11 /***
12 * @author takeshi
13 */
14 public class EntityKey extends ElementSet {
15
16 private boolean primaryKey = false;
17
18 /***
19 * @param parent
20 */
21 public EntityKey(Entity parent) {
22 super(parent);
23 }
24
25 /***
26 * @param parent
27 * @param name
28 */
29 public EntityKey(Entity parent, String name) {
30 super(parent, name);
31 }
32
33
34
35
36
37
38
39 public boolean isEntity() {
40 return true;
41 }
42
43 public void add(EntityKeyEntry entry) {
44 super.add(entry);
45 }
46
47
48
49
50
51
52 public boolean contains(EntityKeyEntry entry) {
53 return super.contains(entry);
54 }
55
56
57
58
59
60
61 public EntityKeyEntry getEntry(int index) {
62 return (EntityKeyEntry) super.getElement(index);
63 }
64
65
66
67
68
69
70 public EntityKeyEntry getEntry(String name) {
71 return (EntityKeyEntry) super.getElement(name);
72 }
73
74
75
76
77
78
79 public EntityKeyEntry removeEntry(String name) {
80 return (EntityKeyEntry) super.removeElement(name);
81 }
82
83 /***
84 * @return Returns the primaryKey.
85 */
86 public boolean isPrimaryKey() {
87 return primaryKey;
88 }
89
90 /***
91 * @param primaryKey
92 * The primaryKey to set.
93 */
94 public void setPrimaryKey(boolean primaryKey) {
95 this.primaryKey = primaryKey;
96 }
97 }