1 4 package test.ejb.cmr; 5 6 13 public class EmployeeData 14 extends java.lang.Object 15 implements java.io.Serializable 16 { 17 private java.lang.Integer id; 18 private java.lang.String name; 19 20 21 private test.ejb.cmr.EmployeeValue EmployeeValue = null; 22 23 public test.ejb.cmr.EmployeeValue getEmployeeValue() 24 { 25 if( EmployeeValue == null ) 26 { 27 EmployeeValue = new test.ejb.cmr.EmployeeValue(); 28 } 29 try 30 { 31 EmployeeValue.setId( getId() ); 32 EmployeeValue.setName( getName() ); 33 } 34 catch (Exception e) 35 { 36 throw new javax.ejb.EJBException (e); 37 } 38 39 return EmployeeValue; 40 } 41 42 public void setEmployeeValue( test.ejb.cmr.EmployeeValue valueHolder ) 43 { 44 45 try 46 { 47 setName( valueHolder.getName() ); 48 } 49 catch (Exception e) 50 { 51 throw new javax.ejb.EJBException (e); 52 } 53 } 54 55 56 57 public EmployeeData() 58 { 59 } 60 61 public EmployeeData( java.lang.Integer id,java.lang.String name ) 62 { 63 setId(id); 64 setName(name); 65 } 66 67 public EmployeeData( EmployeeData otherData ) 68 { 69 setId(otherData.getId()); 70 setName(otherData.getName()); 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 getName() 88 { 89 return this.name; 90 } 91 public void setName( java.lang.String name ) 92 { 93 this.name = name; 94 } 95 96 public String toString() 97 { 98 StringBuffer str = new StringBuffer ("{"); 99 100 str.append("id=" + getId() + " " + "name=" + getName()); 101 str.append('}'); 102 103 return(str.toString()); 104 } 105 106 public boolean equals( Object pOther ) 107 { 108 if( pOther instanceof EmployeeData ) 109 { 110 EmployeeData lTest = (EmployeeData) 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.name == null ) 122 { 123 lEquals = lEquals && ( lTest.name == null ); 124 } 125 else 126 { 127 lEquals = lEquals && this.name.equals( lTest.name ); 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.name != null) ? this.name.hashCode() : 0); 145 146 return result; 147 } 148 149 } 150 | Popular Tags |