KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > test > legacy > Glarch


1 //$Id: Glarch.java,v 1.1 2004/09/26 05:18:25 oneovthafew Exp $
2
package org.hibernate.test.legacy;
3
4 import java.io.Serializable JavaDoc;
5 import java.util.HashMap JavaDoc;
6 import java.util.List JavaDoc;
7 import java.util.Map JavaDoc;
8 import java.util.Set JavaDoc;
9
10 import org.hibernate.CallbackException;
11 import org.hibernate.Session;
12 import org.hibernate.classic.Lifecycle;
13
14 public class Glarch extends Super implements GlarchProxy, Lifecycle, Named, Serializable JavaDoc {
15
16     private int version;
17     private GlarchProxy next;
18     private short order;
19     private List JavaDoc strings;
20     private Map JavaDoc stringSets;
21     private List JavaDoc fooComponents;
22     private GlarchProxy[] proxyArray;
23     private Set JavaDoc proxySet;
24     //private Currency currency = Currency.getInstance( Locale.getDefault() );
25
private transient Map JavaDoc dynaBean;
26     private String JavaDoc immutable;
27     private int derivedVersion;
28     private Object JavaDoc any;
29     private int x;
30     private Multiplicity multiple;
31
32     public int getX() {
33         return x;
34     }
35     public void setX(int x) {
36         this.x = x;
37     }
38
39     public int getVersion() {
40         return version;
41     }
42
43     public void setVersion(int version) {
44         this.version = version;
45     }
46
47     public GlarchProxy getNext() {
48         return next;
49     }
50     public void setNext(GlarchProxy next) {
51         this.next = next;
52     }
53
54     public short getOrder() {
55         return order;
56     }
57     public void setOrder(short order) {
58         this.order = order;
59     }
60
61     public List JavaDoc getStrings() {
62         return strings;
63     }
64
65     public void setStrings(List JavaDoc strings) {
66         this.strings = strings;
67     }
68
69     public Map JavaDoc getStringSets() {
70         return stringSets;
71     }
72
73     public void setStringSets(Map JavaDoc stringSets) {
74         this.stringSets = stringSets;
75     }
76
77     public List JavaDoc getFooComponents() {
78         return fooComponents;
79     }
80
81     public void setFooComponents(List JavaDoc fooComponents) {
82         this.fooComponents = fooComponents;
83     }
84
85     public GlarchProxy[] getProxyArray() {
86         return proxyArray;
87     }
88     public void setProxyArray(GlarchProxy[] proxyArray) {
89         this.proxyArray = proxyArray;
90     }
91     public Set JavaDoc getProxySet() {
92         return proxySet;
93     }
94
95     public void setProxySet(Set JavaDoc proxySet) {
96         this.proxySet = proxySet;
97     }
98
99     public boolean onDelete(Session s) throws CallbackException {
100         return NO_VETO;
101     }
102
103     public void onLoad(Session s, Serializable JavaDoc id) {
104         if ( ! ( ( (String JavaDoc) id ).length()==32 ) ) throw new RuntimeException JavaDoc("id problem");
105     }
106
107     public boolean onSave(Session s) throws CallbackException {
108         dynaBean = new HashMap JavaDoc();
109         dynaBean.put("foo", "foo");
110         dynaBean.put("bar", new Integer JavaDoc(66));
111         immutable="never changes!";
112         return NO_VETO;
113     }
114
115     public boolean onUpdate(Session s) throws CallbackException {
116         return NO_VETO;
117     }
118
119     /*public Currency getCurrency() {
120         return currency;
121     }
122
123     public void setCurrency(Currency currency) {
124         this.currency = currency;
125     }*/

126
127     /**
128      * Returns the dynaBean.
129      * @return DynaBean
130      */

131     public Map JavaDoc getDynaBean() {
132         return dynaBean;
133     }
134
135     /**
136      * Sets the dynaBean.
137      * @param dynaBean The dynaBean to set
138      */

139     public void setDynaBean(Map JavaDoc dynaBean) {
140         this.dynaBean = dynaBean;
141     }
142
143     /**
144      * Returns the immutable.
145      * @return String
146      */

147     public String JavaDoc getImmutable() {
148         return immutable;
149     }
150
151     /**
152      * Sets the immutable.
153      * @param immutable The immutable to set
154      */

155     public void setImmutable(String JavaDoc immutable) {
156         this.immutable = immutable;
157     }
158
159     /**
160      * Returns the derivedVersion.
161      * @return int
162      */

163     public int getDerivedVersion() {
164         return derivedVersion;
165     }
166
167     /**
168      * Sets the derivedVersion.
169      * @param derivedVersion The derivedVersion to set
170      */

171     public void setDerivedVersion(int derivedVersion) {
172         this.derivedVersion = derivedVersion;
173     }
174
175     /**
176      * Returns the any.
177      * @return Object
178      */

179     public Object JavaDoc getAny() {
180         return any;
181     }
182
183     /**
184      * Sets the any.
185      * @param any The any to set
186      */

187     public void setAny(Object JavaDoc any) {
188         this.any = any;
189     }
190
191     /**
192      * @return
193      */

194     public Multiplicity getMultiple() {
195         return multiple;
196     }
197
198     /**
199      * @param multiplicity
200      */

201     public void setMultiple(Multiplicity multiplicity) {
202         multiple = multiplicity;
203     }
204
205     public String JavaDoc getName() {
206         return super.getName();
207     }
208
209 }
210
211
212
213
214
215
216
217
Popular Tags