KickJava   Java API By Example, From Geeks To Geeks.

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


1 //$Id: Baz.java,v 1.2 2004/10/26 09:10:50 oneovthafew Exp $
2
package org.hibernate.test.legacy;
3
4 import java.io.Serializable JavaDoc;
5 import java.util.ArrayList JavaDoc;
6 import java.util.Collection JavaDoc;
7 import java.util.Date JavaDoc;
8 import java.util.HashSet JavaDoc;
9 import java.util.List JavaDoc;
10 import java.util.Map JavaDoc;
11 import java.util.Set JavaDoc;
12 import java.util.SortedSet JavaDoc;
13 import java.util.TreeMap JavaDoc;
14 import java.util.TreeSet JavaDoc;
15
16 public class Baz implements Named, Serializable JavaDoc, Comparable JavaDoc {
17     private SortedSet JavaDoc stringSet;
18     private Map JavaDoc stringDateMap;
19     private List JavaDoc stringList;
20     private int[] intArray;
21     private FooProxy[] fooArray;
22     private String JavaDoc[] stringArray;
23     private String JavaDoc code;
24     private List JavaDoc customs;
25     private List JavaDoc topComponents;
26     private Set JavaDoc fooSet;
27     private FooComponent[] components;
28     private Date JavaDoc[] timeArray;
29     private int count;
30     private String JavaDoc name;
31     private Collection JavaDoc bag;
32     private Set JavaDoc topFoos;
33     private Map JavaDoc topGlarchez;
34     private Set JavaDoc cascadingBars;
35     private Map JavaDoc fooToGlarch;
36     private Map JavaDoc fooComponentToFoo;
37     private Map JavaDoc glarchToFoo;
38     private List JavaDoc fees;
39     private Collection JavaDoc fooBag;
40     private Set JavaDoc cached;
41     private Map JavaDoc cachedMap;
42     private Map JavaDoc stringGlarchMap;
43     private Map JavaDoc anyToAny;
44     private List JavaDoc manyToAny;
45     private Collection JavaDoc idFooBag;
46     private Collection JavaDoc byteBag;
47     private FooProxy foo;
48     private List JavaDoc bazez;
49     private SortedSet JavaDoc sortablez;
50     private NestingComponent collectionComponent;
51     private String JavaDoc text;
52     private List JavaDoc parts;
53     private List JavaDoc moreParts;
54     public List JavaDoc subs;
55     public Baz superBaz;
56     
57     Baz() {}
58     
59     public SortedSet JavaDoc getStringSet() {
60         return stringSet;
61     }
62     public void setStringSet(SortedSet JavaDoc stringSet) {
63         this.stringSet = stringSet;
64     }
65     public Map JavaDoc getStringDateMap() {
66         return stringDateMap;
67     }
68     public void setStringDateMap(Map JavaDoc stringDateMap) {
69         this.stringDateMap = stringDateMap;
70     }
71     public List JavaDoc getStringList() {
72         return stringList;
73     }
74     public void setStringList(List JavaDoc stringList) {
75         this.stringList = stringList;
76     }
77     public int[] getIntArray() {
78         return intArray;
79     }
80     public void setIntArray(int[] intArray) {
81         this.intArray = intArray;
82     }
83     public FooProxy[] getFooArray() {
84         return fooArray;
85     }
86     public void setFooArray(FooProxy[] fooArray) {
87         this.fooArray = fooArray;
88     }
89     public String JavaDoc[] getStringArray() {
90         return stringArray;
91     }
92     public void setStringArray(String JavaDoc[] stringArray) {
93         this.stringArray = stringArray;
94     }
95     
96     public String JavaDoc getCode() {
97         return code;
98     }
99     public void setCode(String JavaDoc code) {
100         this.code = code;
101     }
102     
103     public void setDefaults() {
104         SortedSet JavaDoc set = new TreeSet JavaDoc();
105         set.add("foo"); set.add("bar"); set.add("baz");
106         setStringSet(set);
107         Map JavaDoc map = new TreeMap JavaDoc();
108         map.put( "now", new Date JavaDoc() );
109         map.put( "never", null );
110         map.put( "big bang", new Date JavaDoc(0) );
111         setStringDateMap(map);
112         List JavaDoc list = new ArrayList JavaDoc();
113         list.addAll(set);
114         setStringList(list);
115         setIntArray( new int[] { 1,3,3,7 } );
116         setFooArray( new Foo[0] );
117         setStringArray( (String JavaDoc[]) list.toArray( new String JavaDoc[0] ) );
118         customs = new ArrayList JavaDoc();
119         customs.add( new String JavaDoc[] { "foo", "bar" } );
120         customs.add( new String JavaDoc[] { "A", "B" } );
121         customs.add( new String JavaDoc[] { "1", "2" } );
122         
123         fooSet = new HashSet JavaDoc();
124         components = new FooComponent[] {
125             new FooComponent("foo", 42, null, null),
126             new FooComponent("bar", 88, null, new FooComponent("sub", 69, null, null) )
127         };
128         timeArray = new Date JavaDoc[] { new Date JavaDoc(), new Date JavaDoc(), null, new Date JavaDoc(0) };
129         TreeSet JavaDoc x = new TreeSet JavaDoc();
130         x.add("w"); x.add("x"); x.add("y"); x.add("z");
131         TreeSet JavaDoc a = new TreeSet JavaDoc();
132         a.add("a"); a.add("b"); a.add("d"); a.add("c");
133         
134         count = 667;
135         name="Bazza";
136         topComponents = new ArrayList JavaDoc();
137         topComponents.add( new FooComponent("foo", 11, new Date JavaDoc[] { new Date JavaDoc(), new Date JavaDoc(123) }, null) );
138         topComponents.add( new FooComponent("bar", 22, new Date JavaDoc[] { new Date JavaDoc(7), new Date JavaDoc(456) }, null) );
139         topComponents.add( null );
140         bag = new ArrayList JavaDoc();
141         bag.add("duplicate");
142         bag.add("duplicate");
143         bag.add("duplicate");
144         bag.add("unique");
145         cached = new TreeSet JavaDoc();
146         CompositeElement ce = new CompositeElement();
147         ce.setFoo("foo");
148         ce.setBar("bar");
149         CompositeElement ce2 = new CompositeElement();
150         ce2.setFoo("fooxxx");
151         ce2.setBar("barxxx");
152         cached.add(ce);
153         cached.add(ce2);
154         cachedMap = new TreeMap JavaDoc();
155         cachedMap.put(this, ce);
156         
157         text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
158         for (int i=0; i<10; i++) text+=text;
159         
160     }
161     
162     public List JavaDoc getCustoms() {
163         return customs;
164     }
165     public void setCustoms(List JavaDoc customs) {
166         this.customs = customs;
167     }
168     
169     public Set JavaDoc getFooSet() {
170         return fooSet;
171     }
172     public void setFooSet(Set JavaDoc fooSet) {
173         this.fooSet = fooSet;
174     }
175     
176     public FooComponent[] getComponents() {
177         return components;
178     }
179     public void setComponents(FooComponent[] components) {
180         this.components = components;
181     }
182     
183     public Date JavaDoc[] getTimeArray() {
184         return timeArray;
185     }
186     
187     public void setTimeArray(Date JavaDoc[] timeArray) {
188         this.timeArray = timeArray;
189     }
190     
191     public int getCount() {
192         return count;
193     }
194     
195     public void setCount(int count) {
196         this.count = count;
197     }
198     
199     public String JavaDoc getName() {
200         return name;
201     }
202     
203     public void setName(String JavaDoc name) {
204         this.name = name;
205     }
206     
207     public List JavaDoc getTopComponents() {
208         return topComponents;
209     }
210     
211     public void setTopComponents(List JavaDoc topComponents) {
212         this.topComponents = topComponents;
213     }
214     
215     public Collection JavaDoc getBag() {
216         return bag;
217     }
218     
219     public void setBag(Collection JavaDoc bag) {
220         this.bag = bag;
221     }
222     
223     public Set JavaDoc getTopFoos() {
224         return topFoos;
225     }
226     
227     public void setTopFoos(Set JavaDoc topFoos) {
228         this.topFoos = topFoos;
229     }
230     
231     
232     public Map JavaDoc getTopGlarchez() {
233         return topGlarchez;
234     }
235     
236     public void setTopGlarchez(Map JavaDoc topGlarchez) {
237         this.topGlarchez = topGlarchez;
238     }
239     
240     public Set JavaDoc getCascadingBars() {
241         return cascadingBars;
242     }
243     
244     public void setCascadingBars(Set JavaDoc cascadingBars) {
245         this.cascadingBars = cascadingBars;
246     }
247     
248     public Map JavaDoc getFooToGlarch() {
249         return fooToGlarch;
250     }
251     
252     public void setFooToGlarch(Map JavaDoc fooToGlarch) {
253         this.fooToGlarch = fooToGlarch;
254     }
255     
256     public Map JavaDoc getFooComponentToFoo() {
257         return fooComponentToFoo;
258     }
259     
260     public void setFooComponentToFoo(Map JavaDoc fooComponentToFoo) {
261         this.fooComponentToFoo = fooComponentToFoo;
262     }
263     
264     public Map JavaDoc getGlarchToFoo() {
265         return glarchToFoo;
266     }
267     
268     public void setGlarchToFoo(Map JavaDoc glarchToFoo) {
269         this.glarchToFoo = glarchToFoo;
270     }
271     
272     public List JavaDoc getFees() {
273         return fees;
274     }
275
276     public void setFees(List JavaDoc fees) {
277         this.fees = fees;
278     }
279
280     public Collection JavaDoc getFooBag() {
281         return fooBag;
282     }
283
284     public void setFooBag(Collection JavaDoc fooBag) {
285         this.fooBag = fooBag;
286     }
287
288     /**
289      * Returns the cached.
290      * @return Set
291      */

292     public Set JavaDoc getCached() {
293         return cached;
294     }
295
296     /**
297      * Sets the cached.
298      * @param cached The cached to set
299      */

300     public void setCached(Set JavaDoc cached) {
301         this.cached = cached;
302     }
303
304     /**
305      * Returns the cachedMap.
306      * @return Map
307      */

308     public Map JavaDoc getCachedMap() {
309         return cachedMap;
310     }
311
312     /**
313      * Sets the cachedMap.
314      * @param cachedMap The cachedMap to set
315      */

316     public void setCachedMap(Map JavaDoc cachedMap) {
317         this.cachedMap = cachedMap;
318     }
319
320     /**
321      * @see java.lang.Comparable#compareTo(java.lang.Object)
322      */

323     public int compareTo(Object JavaDoc o) {
324         return ( (Baz) o ).code.compareTo(code);
325     }
326
327     /**
328      * Returns the stringGlarchMap.
329      * @return Map
330      */

331     public Map JavaDoc getStringGlarchMap() {
332         return stringGlarchMap;
333     }
334
335     /**
336      * Sets the stringGlarchMap.
337      * @param stringGlarchMap The stringGlarchMap to set
338      */

339     public void setStringGlarchMap(Map JavaDoc stringGlarchMap) {
340         this.stringGlarchMap = stringGlarchMap;
341     }
342
343     /**
344      * Returns the anyToAny.
345      * @return Map
346      */

347     public Map JavaDoc getAnyToAny() {
348         return anyToAny;
349     }
350
351     /**
352      * Sets the anyToAny.
353      * @param anyToAny The anyToAny to set
354      */

355     public void setAnyToAny(Map JavaDoc anyToAny) {
356         this.anyToAny = anyToAny;
357     }
358
359     public Collection JavaDoc getIdFooBag() {
360         return idFooBag;
361     }
362
363     public void setIdFooBag(Collection JavaDoc collection) {
364         idFooBag = collection;
365     }
366
367     public Collection JavaDoc getByteBag() {
368         return byteBag;
369     }
370
371     public void setByteBag(Collection JavaDoc list) {
372         byteBag = list;
373     }
374
375     public FooProxy getFoo() {
376         return foo;
377     }
378
379     public void setFoo(FooProxy foo) {
380         this.foo = foo;
381     }
382
383     public List JavaDoc getBazez() {
384         return bazez;
385     }
386
387     public void setBazez(List JavaDoc list) {
388         bazez = list;
389     }
390
391     public SortedSet JavaDoc getSortablez() {
392         return sortablez;
393     }
394
395     public void setSortablez(SortedSet JavaDoc set) {
396         sortablez = set;
397     }
398
399
400     public NestingComponent getCollectionComponent() {
401         return collectionComponent;
402     }
403
404     public void setCollectionComponent(NestingComponent collection) {
405         collectionComponent = collection;
406     }
407
408     /**
409      * @return
410      */

411     public String JavaDoc getText() {
412         return text;
413     }
414
415     /**
416      * @param string
417      */

418     public void setText(String JavaDoc string) {
419         text = string;
420     }
421
422     public List JavaDoc getParts() {
423         return parts;
424     }
425
426     public void setParts(List JavaDoc list) {
427         parts = list;
428     }
429
430     public List JavaDoc getManyToAny() {
431         return manyToAny;
432     }
433
434     public void setManyToAny(List JavaDoc manyToAny) {
435         this.manyToAny = manyToAny;
436     }
437
438     public List JavaDoc getMoreParts() {
439         return moreParts;
440     }
441     public void setMoreParts(List JavaDoc moreParts) {
442         this.moreParts = moreParts;
443     }
444 }
445
446
447
448
449
450
451
452
Popular Tags