1 4 package test.ejb.cmr; 5 6 19 public class EmployeeAddressValue 20 extends java.lang.Object 21 implements java.io.Serializable , java.lang.Cloneable 22 { 23 24 private java.lang.Integer id; 25 private boolean idHasBeenSet = false; 26 27 private java.lang.String description; 28 private boolean descriptionHasBeenSet = false; 29 30 private java.lang.Integer primaryKey; 31 32 public EmployeeAddressValue() 33 { 34 } 35 36 public EmployeeAddressValue( java.lang.Integer id,java.lang.String description ) 37 { 38 setId(id); 39 setDescription(description); 40 primaryKey = this.getId(); 41 } 42 43 46 public EmployeeAddressValue( EmployeeAddressValue otherValue ) 47 { 48 this.id = otherValue.id; 49 idHasBeenSet = true; 50 this.description = otherValue.description; 51 descriptionHasBeenSet = true; 52 53 primaryKey = this.getId(); 54 } 55 56 public java.lang.Integer getPrimaryKey() 57 { 58 return primaryKey; 59 } 60 61 public void setPrimaryKey( java.lang.Integer primaryKey) 62 { 63 this.primaryKey = primaryKey; 66 setId( primaryKey ); 67 } 68 69 public java.lang.Integer getId() 70 { 71 return this.id; 72 } 73 74 public void setId( java.lang.Integer id ) 75 { 76 this.id = id; 77 idHasBeenSet = true; 78 79 primaryKey = id; 80 } 81 82 public boolean idHasBeenSet(){ 83 return idHasBeenSet; 84 } 85 public java.lang.String getDescription() 86 { 87 return this.description; 88 } 89 90 public void setDescription( java.lang.String description ) 91 { 92 this.description = description; 93 descriptionHasBeenSet = true; 94 95 } 96 97 public boolean descriptionHasBeenSet(){ 98 return descriptionHasBeenSet; 99 } 100 101 public String toString() 102 { 103 StringBuffer str = new StringBuffer ("{"); 104 105 str.append("id=" + getId() + " " + "description=" + getDescription()); 106 str.append('}'); 107 108 return(str.toString()); 109 } 110 111 116 protected boolean hasIdentity() 117 { 118 return idHasBeenSet; 119 } 120 121 125 public boolean isIdentical(Object other) 126 { 127 if (other instanceof EmployeeAddressValue) 128 { 129 EmployeeAddressValue that = (EmployeeAddressValue) other; 130 boolean lEquals = true; 131 if( this.id == null ) 132 { 133 lEquals = lEquals && ( that.id == null ); 134 } 135 else 136 { 137 lEquals = lEquals && this.id.equals( that.id ); 138 } 139 if( this.description == null ) 140 { 141 lEquals = lEquals && ( that.description == null ); 142 } 143 else 144 { 145 lEquals = lEquals && this.description.equals( that.description ); 146 } 147 148 return lEquals; 149 } 150 else 151 { 152 return false; 153 } 154 } 155 156 public boolean equals(Object other) { 157 158 if (!(other instanceof EmployeeAddressValue)) { 160 return false; 161 } 162 163 return equals((EmployeeAddressValue) other); 164 } 165 166 171 public boolean equals(EmployeeAddressValue that) { 172 173 if (this == that) { 175 return true; 176 } 177 if(null == that) { 179 return false; 180 } 181 182 if(this.id != that.id) { 183 184 if( this.id == null || that.id == null ) { 185 return false; 186 } 187 188 if(!this.id.equals(that.id)) { 189 return false; 190 } 191 192 } 193 194 if(this.description != that.description) { 195 196 if( this.description == null || that.description == null ) { 197 return false; 198 } 199 200 if(!this.description.equals(that.description)) { 201 return false; 202 } 203 204 } 205 206 return true; 207 208 } 209 210 public Object clone() throws java.lang.CloneNotSupportedException { 211 EmployeeAddressValue other = (EmployeeAddressValue) super.clone(); 212 213 return other; 214 } 215 216 public ReadOnlyEmployeeAddressValue getReadOnlyEmployeeAddressValue() { 217 return new ReadOnlyEmployeeAddressValue(); 218 } 219 220 public int hashCode(){ 221 int result = 17; 222 result = 37*result + ((this.id != null) ? this.id.hashCode() : 0); 223 224 result = 37*result + ((this.description != null) ? this.description.hashCode() : 0); 225 226 return result; 227 } 228 229 236 private static java.util.Collection wrapCollection(java.util.Collection input) { 237 return java.util.Collections.synchronizedCollection(input); 238 } 239 246 private static java.util.Set wrapCollection(java.util.Set input) { 247 return java.util.Collections.synchronizedSet(input); 248 } 249 255 private static java.util.Collection wrapReadOnly(java.util.Collection input) { 256 return java.util.Collections.unmodifiableCollection(input); 257 } 258 264 private static java.util.Set wrapReadOnly(java.util.Set input) { 265 return java.util.Collections.unmodifiableSet(input); 266 } 267 268 private final class ReadOnlyEmployeeAddressValue 269 implements java.lang.Cloneable , java.io.Serializable 270 { 271 private EmployeeAddressValue underlying() { 272 return EmployeeAddressValue.this; 273 } 274 275 public java.lang.Integer getId() { 276 return underlying().id; 277 } 278 279 public java.lang.String getDescription() { 280 return underlying().description; 281 } 282 283 public int hashCode() { 284 return 101 * underlying().hashCode(); 285 } 286 287 public boolean equals(Object o) { 288 if(o instanceof ReadOnlyEmployeeAddressValue) { 289 return this.equals((ReadOnlyEmployeeAddressValue) o); 290 } 291 return false; 292 } 293 294 public boolean equals(ReadOnlyEmployeeAddressValue that) { 295 if(null == that) { 296 return false; 297 } 298 299 return this.underlying().equals(that.underlying()); 300 } 301 302 } 303 304 } 305 | Popular Tags |