1 package org.hibernate.test.legacy; 3 4 import java.io.Serializable ; 5 import java.util.HashMap ; 6 import java.util.List ; 7 import java.util.Map ; 8 import java.util.Set ; 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 { 15 16 private int version; 17 private GlarchProxy next; 18 private short order; 19 private List strings; 20 private Map stringSets; 21 private List fooComponents; 22 private GlarchProxy[] proxyArray; 23 private Set proxySet; 24 private transient Map dynaBean; 26 private String immutable; 27 private int derivedVersion; 28 private Object 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 getStrings() { 62 return strings; 63 } 64 65 public void setStrings(List strings) { 66 this.strings = strings; 67 } 68 69 public Map getStringSets() { 70 return stringSets; 71 } 72 73 public void setStringSets(Map stringSets) { 74 this.stringSets = stringSets; 75 } 76 77 public List getFooComponents() { 78 return fooComponents; 79 } 80 81 public void setFooComponents(List 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 getProxySet() { 92 return proxySet; 93 } 94 95 public void setProxySet(Set 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 id) { 104 if ( ! ( ( (String ) id ).length()==32 ) ) throw new RuntimeException ("id problem"); 105 } 106 107 public boolean onSave(Session s) throws CallbackException { 108 dynaBean = new HashMap (); 109 dynaBean.put("foo", "foo"); 110 dynaBean.put("bar", new Integer (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 126 127 131 public Map getDynaBean() { 132 return dynaBean; 133 } 134 135 139 public void setDynaBean(Map dynaBean) { 140 this.dynaBean = dynaBean; 141 } 142 143 147 public String getImmutable() { 148 return immutable; 149 } 150 151 155 public void setImmutable(String immutable) { 156 this.immutable = immutable; 157 } 158 159 163 public int getDerivedVersion() { 164 return derivedVersion; 165 } 166 167 171 public void setDerivedVersion(int derivedVersion) { 172 this.derivedVersion = derivedVersion; 173 } 174 175 179 public Object getAny() { 180 return any; 181 } 182 183 187 public void setAny(Object any) { 188 this.any = any; 189 } 190 191 194 public Multiplicity getMultiple() { 195 return multiple; 196 } 197 198 201 public void setMultiple(Multiplicity multiplicity) { 202 multiple = multiplicity; 203 } 204 205 public String getName() { 206 return super.getName(); 207 } 208 209 } 210 211 212 213 214 215 216 217 | Popular Tags |