1 4 package test.interfaces; 5 6 13 public class AddressData 14 extends java.lang.Object 15 implements java.io.Serializable 16 { 17 private java.lang.String id; 18 private java.lang.String street; 19 private java.lang.String city; 20 private int readOnly; 21 private java.util.Date creationDate; 22 23 24 private test.interfaces.AddressValue AddressValue = null; 25 26 public test.interfaces.AddressValue getAddressValue() 27 { 28 if( AddressValue == null ) 29 { 30 AddressValue = new test.interfaces.AddressValue(); 31 } 32 try 33 { 34 AddressValue.setId( getId() ); 35 } 36 catch (Exception e) 37 { 38 throw new javax.ejb.EJBException (e); 39 } 40 41 return AddressValue; 42 } 43 44 public void setAddressValue( test.interfaces.AddressValue valueHolder ) 45 { 46 47 try 48 { 49 } 50 catch (Exception e) 51 { 52 throw new javax.ejb.EJBException (e); 53 } 54 } 55 56 57 58 public AddressData() 59 { 60 } 61 62 public AddressData( java.lang.String id,java.lang.String street,java.lang.String city,int readOnly,java.util.Date creationDate ) 63 { 64 setId(id); 65 this.street = street; 66 this.city = city; 67 this.readOnly = readOnly; 68 setCreationDate(creationDate); 69 } 70 71 public AddressData( AddressData otherData ) 72 { 73 setId(otherData.getId()); 74 this.street = otherData.street; 75 this.city = otherData.city; 76 this.readOnly = otherData.readOnly; 77 setCreationDate(otherData.getCreationDate()); 78 79 } 80 81 public java.lang.String getPrimaryKey() { 82 return getId(); 83 } 84 85 public java.lang.String getId() 86 { 87 return this.id; 88 } 89 public void setId( java.lang.String id ) 90 { 91 this.id = id; 92 } 93 94 public java.lang.String getStreet() 95 { 96 return this.street; 97 } 98 public void setStreet( java.lang.String street ) 99 { 100 this.street = street; 101 } 102 103 public java.lang.String getCity() 104 { 105 return this.city; 106 } 107 public void setCity( java.lang.String city ) 108 { 109 this.city = city; 110 } 111 112 public int getReadOnly() 113 { 114 return this.readOnly; 115 } 116 public void setReadOnly( int readOnly ) 117 { 118 this.readOnly = readOnly; 119 } 120 121 public java.util.Date getCreationDate() 122 { 123 return this.creationDate; 124 } 125 public void setCreationDate( java.util.Date creationDate ) 126 { 127 this.creationDate = creationDate; 128 } 129 130 public String toString() 131 { 132 StringBuffer str = new StringBuffer ("{"); 133 134 str.append("id=" + getId() + " " + "street=" + getStreet() + " " + "city=" + getCity() + " " + "readOnly=" + getReadOnly() + " " + "creationDate=" + getCreationDate()); 135 str.append('}'); 136 137 return(str.toString()); 138 } 139 140 public boolean equals( Object pOther ) 141 { 142 if( pOther instanceof AddressData ) 143 { 144 AddressData lTest = (AddressData) pOther; 145 boolean lEquals = true; 146 147 if( this.id == null ) 148 { 149 lEquals = lEquals && ( lTest.id == null ); 150 } 151 else 152 { 153 lEquals = lEquals && this.id.equals( lTest.id ); 154 } 155 if( this.street == null ) 156 { 157 lEquals = lEquals && ( lTest.street == null ); 158 } 159 else 160 { 161 lEquals = lEquals && this.street.equals( lTest.street ); 162 } 163 if( this.city == null ) 164 { 165 lEquals = lEquals && ( lTest.city == null ); 166 } 167 else 168 { 169 lEquals = lEquals && this.city.equals( lTest.city ); 170 } 171 lEquals = lEquals && this.readOnly == lTest.readOnly; 172 if( this.creationDate == null ) 173 { 174 lEquals = lEquals && ( lTest.creationDate == null ); 175 } 176 else 177 { 178 lEquals = lEquals && this.creationDate.equals( lTest.creationDate ); 179 } 180 181 return lEquals; 182 } 183 else 184 { 185 return false; 186 } 187 } 188 189 public int hashCode() 190 { 191 int result = 17; 192 193 result = 37*result + ((this.id != null) ? this.id.hashCode() : 0); 194 195 result = 37*result + ((this.street != null) ? this.street.hashCode() : 0); 196 197 result = 37*result + ((this.city != null) ? this.city.hashCode() : 0); 198 199 result = 37*result + (int) readOnly; 200 201 result = 37*result + ((this.creationDate != null) ? this.creationDate.hashCode() : 0); 202 203 return result; 204 } 205 206 } 207 | Popular Tags |