1 4 package test.ejb.cmr; 5 6 13 public class EmployeeAddressData 14 extends java.lang.Object 15 implements java.io.Serializable 16 { 17 private java.lang.Integer id; 18 private java.lang.String description; 19 20 21 private test.ejb.cmr.EmployeeAddressValue EmployeeAddressValue = null; 22 23 public test.ejb.cmr.EmployeeAddressValue getEmployeeAddressValue() 24 { 25 if( EmployeeAddressValue == null ) 26 { 27 EmployeeAddressValue = new test.ejb.cmr.EmployeeAddressValue(); 28 } 29 try 30 { 31 EmployeeAddressValue.setId( getId() ); 32 EmployeeAddressValue.setDescription( getDescription() ); 33 } 34 catch (Exception e) 35 { 36 throw new javax.ejb.EJBException (e); 37 } 38 39 return EmployeeAddressValue; 40 } 41 42 public void setEmployeeAddressValue( test.ejb.cmr.EmployeeAddressValue valueHolder ) 43 { 44 45 try 46 { 47 setDescription( valueHolder.getDescription() ); 48 } 49 catch (Exception e) 50 { 51 throw new javax.ejb.EJBException (e); 52 } 53 } 54 55 56 57 public EmployeeAddressData() 58 { 59 } 60 61 public EmployeeAddressData( java.lang.Integer id,java.lang.String description ) 62 { 63 setId(id); 64 setDescription(description); 65 } 66 67 public EmployeeAddressData( EmployeeAddressData otherData ) 68 { 69 setId(otherData.getId()); 70 setDescription(otherData.getDescription()); 71 72 } 73 74 public java.lang.Integer getPrimaryKey() { 75 return getId(); 76 } 77 78 public java.lang.Integer getId() 79 { 80 return this.id; 81 } 82 public void setId( java.lang.Integer id ) 83 { 84 this.id = id; 85 } 86 87 public java.lang.String getDescription() 88 { 89 return this.description; 90 } 91 public void setDescription( java.lang.String description ) 92 { 93 this.description = description; 94 } 95 96 public String toString() 97 { 98 StringBuffer str = new StringBuffer ("{"); 99 100 str.append("id=" + getId() + " " + "description=" + getDescription()); 101 str.append('}'); 102 103 return(str.toString()); 104 } 105 106 public boolean equals( Object pOther ) 107 { 108 if( pOther instanceof EmployeeAddressData ) 109 { 110 EmployeeAddressData lTest = (EmployeeAddressData) pOther; 111 boolean lEquals = true; 112 113 if( this.id == null ) 114 { 115 lEquals = lEquals && ( lTest.id == null ); 116 } 117 else 118 { 119 lEquals = lEquals && this.id.equals( lTest.id ); 120 } 121 if( this.description == null ) 122 { 123 lEquals = lEquals && ( lTest.description == null ); 124 } 125 else 126 { 127 lEquals = lEquals && this.description.equals( lTest.description ); 128 } 129 130 return lEquals; 131 } 132 else 133 { 134 return false; 135 } 136 } 137 138 public int hashCode() 139 { 140 int result = 17; 141 142 result = 37*result + ((this.id != null) ? this.id.hashCode() : 0); 143 144 result = 37*result + ((this.description != null) ? this.description.hashCode() : 0); 145 146 return result; 147 } 148 149 } 150 | Popular Tags |