1 package org.hibernate.test.legacy; 3 4 import java.io.Serializable ; 5 import java.util.ArrayList ; 6 import java.util.Collection ; 7 import java.util.Date ; 8 import java.util.HashSet ; 9 import java.util.List ; 10 import java.util.Map ; 11 import java.util.Set ; 12 import java.util.SortedSet ; 13 import java.util.TreeMap ; 14 import java.util.TreeSet ; 15 16 public class Baz implements Named, Serializable , Comparable { 17 private SortedSet stringSet; 18 private Map stringDateMap; 19 private List stringList; 20 private int[] intArray; 21 private FooProxy[] fooArray; 22 private String [] stringArray; 23 private String code; 24 private List customs; 25 private List topComponents; 26 private Set fooSet; 27 private FooComponent[] components; 28 private Date [] timeArray; 29 private int count; 30 private String name; 31 private Collection bag; 32 private Set topFoos; 33 private Map topGlarchez; 34 private Set cascadingBars; 35 private Map fooToGlarch; 36 private Map fooComponentToFoo; 37 private Map glarchToFoo; 38 private List fees; 39 private Collection fooBag; 40 private Set cached; 41 private Map cachedMap; 42 private Map stringGlarchMap; 43 private Map anyToAny; 44 private List manyToAny; 45 private Collection idFooBag; 46 private Collection byteBag; 47 private FooProxy foo; 48 private List bazez; 49 private SortedSet sortablez; 50 private NestingComponent collectionComponent; 51 private String text; 52 private List parts; 53 private List moreParts; 54 public List subs; 55 public Baz superBaz; 56 57 Baz() {} 58 59 public SortedSet getStringSet() { 60 return stringSet; 61 } 62 public void setStringSet(SortedSet stringSet) { 63 this.stringSet = stringSet; 64 } 65 public Map getStringDateMap() { 66 return stringDateMap; 67 } 68 public void setStringDateMap(Map stringDateMap) { 69 this.stringDateMap = stringDateMap; 70 } 71 public List getStringList() { 72 return stringList; 73 } 74 public void setStringList(List 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 [] getStringArray() { 90 return stringArray; 91 } 92 public void setStringArray(String [] stringArray) { 93 this.stringArray = stringArray; 94 } 95 96 public String getCode() { 97 return code; 98 } 99 public void setCode(String code) { 100 this.code = code; 101 } 102 103 public void setDefaults() { 104 SortedSet set = new TreeSet (); 105 set.add("foo"); set.add("bar"); set.add("baz"); 106 setStringSet(set); 107 Map map = new TreeMap (); 108 map.put( "now", new Date () ); 109 map.put( "never", null ); 110 map.put( "big bang", new Date (0) ); 111 setStringDateMap(map); 112 List list = new ArrayList (); 113 list.addAll(set); 114 setStringList(list); 115 setIntArray( new int[] { 1,3,3,7 } ); 116 setFooArray( new Foo[0] ); 117 setStringArray( (String []) list.toArray( new String [0] ) ); 118 customs = new ArrayList (); 119 customs.add( new String [] { "foo", "bar" } ); 120 customs.add( new String [] { "A", "B" } ); 121 customs.add( new String [] { "1", "2" } ); 122 123 fooSet = new HashSet (); 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 [] { new Date (), new Date (), null, new Date (0) }; 129 TreeSet x = new TreeSet (); 130 x.add("w"); x.add("x"); x.add("y"); x.add("z"); 131 TreeSet a = new TreeSet (); 132 a.add("a"); a.add("b"); a.add("d"); a.add("c"); 133 134 count = 667; 135 name="Bazza"; 136 topComponents = new ArrayList (); 137 topComponents.add( new FooComponent("foo", 11, new Date [] { new Date (), new Date (123) }, null) ); 138 topComponents.add( new FooComponent("bar", 22, new Date [] { new Date (7), new Date (456) }, null) ); 139 topComponents.add( null ); 140 bag = new ArrayList (); 141 bag.add("duplicate"); 142 bag.add("duplicate"); 143 bag.add("duplicate"); 144 bag.add("unique"); 145 cached = new TreeSet (); 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 (); 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 getCustoms() { 163 return customs; 164 } 165 public void setCustoms(List customs) { 166 this.customs = customs; 167 } 168 169 public Set getFooSet() { 170 return fooSet; 171 } 172 public void setFooSet(Set 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 [] getTimeArray() { 184 return timeArray; 185 } 186 187 public void setTimeArray(Date [] 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 getName() { 200 return name; 201 } 202 203 public void setName(String name) { 204 this.name = name; 205 } 206 207 public List getTopComponents() { 208 return topComponents; 209 } 210 211 public void setTopComponents(List topComponents) { 212 this.topComponents = topComponents; 213 } 214 215 public Collection getBag() { 216 return bag; 217 } 218 219 public void setBag(Collection bag) { 220 this.bag = bag; 221 } 222 223 public Set getTopFoos() { 224 return topFoos; 225 } 226 227 public void setTopFoos(Set topFoos) { 228 this.topFoos = topFoos; 229 } 230 231 232 public Map getTopGlarchez() { 233 return topGlarchez; 234 } 235 236 public void setTopGlarchez(Map topGlarchez) { 237 this.topGlarchez = topGlarchez; 238 } 239 240 public Set getCascadingBars() { 241 return cascadingBars; 242 } 243 244 public void setCascadingBars(Set cascadingBars) { 245 this.cascadingBars = cascadingBars; 246 } 247 248 public Map getFooToGlarch() { 249 return fooToGlarch; 250 } 251 252 public void setFooToGlarch(Map fooToGlarch) { 253 this.fooToGlarch = fooToGlarch; 254 } 255 256 public Map getFooComponentToFoo() { 257 return fooComponentToFoo; 258 } 259 260 public void setFooComponentToFoo(Map fooComponentToFoo) { 261 this.fooComponentToFoo = fooComponentToFoo; 262 } 263 264 public Map getGlarchToFoo() { 265 return glarchToFoo; 266 } 267 268 public void setGlarchToFoo(Map glarchToFoo) { 269 this.glarchToFoo = glarchToFoo; 270 } 271 272 public List getFees() { 273 return fees; 274 } 275 276 public void setFees(List fees) { 277 this.fees = fees; 278 } 279 280 public Collection getFooBag() { 281 return fooBag; 282 } 283 284 public void setFooBag(Collection fooBag) { 285 this.fooBag = fooBag; 286 } 287 288 292 public Set getCached() { 293 return cached; 294 } 295 296 300 public void setCached(Set cached) { 301 this.cached = cached; 302 } 303 304 308 public Map getCachedMap() { 309 return cachedMap; 310 } 311 312 316 public void setCachedMap(Map cachedMap) { 317 this.cachedMap = cachedMap; 318 } 319 320 323 public int compareTo(Object o) { 324 return ( (Baz) o ).code.compareTo(code); 325 } 326 327 331 public Map getStringGlarchMap() { 332 return stringGlarchMap; 333 } 334 335 339 public void setStringGlarchMap(Map stringGlarchMap) { 340 this.stringGlarchMap = stringGlarchMap; 341 } 342 343 347 public Map getAnyToAny() { 348 return anyToAny; 349 } 350 351 355 public void setAnyToAny(Map anyToAny) { 356 this.anyToAny = anyToAny; 357 } 358 359 public Collection getIdFooBag() { 360 return idFooBag; 361 } 362 363 public void setIdFooBag(Collection collection) { 364 idFooBag = collection; 365 } 366 367 public Collection getByteBag() { 368 return byteBag; 369 } 370 371 public void setByteBag(Collection 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 getBazez() { 384 return bazez; 385 } 386 387 public void setBazez(List list) { 388 bazez = list; 389 } 390 391 public SortedSet getSortablez() { 392 return sortablez; 393 } 394 395 public void setSortablez(SortedSet 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 411 public String getText() { 412 return text; 413 } 414 415 418 public void setText(String string) { 419 text = string; 420 } 421 422 public List getParts() { 423 return parts; 424 } 425 426 public void setParts(List list) { 427 parts = list; 428 } 429 430 public List getManyToAny() { 431 return manyToAny; 432 } 433 434 public void setManyToAny(List manyToAny) { 435 this.manyToAny = manyToAny; 436 } 437 438 public List getMoreParts() { 439 return moreParts; 440 } 441 public void setMoreParts(List moreParts) { 442 this.moreParts = moreParts; 443 } 444 } 445 446 447 448 449 450 451 452 | Popular Tags |