1 4 package test.ejb.cmr; 5 6 13 public class LanguageCodeData 14 extends java.lang.Object 15 implements java.io.Serializable 16 { 17 private java.lang.Integer languageCodeId; 18 private java.lang.String name; 19 20 21 22 23 24 public LanguageCodeData() 25 { 26 } 27 28 public LanguageCodeData( java.lang.Integer languageCodeId,java.lang.String name ) 29 { 30 setLanguageCodeId(languageCodeId); 31 setName(name); 32 } 33 34 public LanguageCodeData( LanguageCodeData otherData ) 35 { 36 setLanguageCodeId(otherData.getLanguageCodeId()); 37 setName(otherData.getName()); 38 39 } 40 41 public java.lang.Integer getPrimaryKey() { 42 return getLanguageCodeId(); 43 } 44 45 public java.lang.Integer getLanguageCodeId() 46 { 47 return this.languageCodeId; 48 } 49 public void setLanguageCodeId( java.lang.Integer languageCodeId ) 50 { 51 this.languageCodeId = languageCodeId; 52 } 53 54 public java.lang.String getName() 55 { 56 return this.name; 57 } 58 public void setName( java.lang.String name ) 59 { 60 this.name = name; 61 } 62 63 public String toString() 64 { 65 StringBuffer str = new StringBuffer ("{"); 66 67 str.append("languageCodeId=" + getLanguageCodeId() + " " + "name=" + getName()); 68 str.append('}'); 69 70 return(str.toString()); 71 } 72 73 public boolean equals( Object pOther ) 74 { 75 if( pOther instanceof LanguageCodeData ) 76 { 77 LanguageCodeData lTest = (LanguageCodeData) pOther; 78 boolean lEquals = true; 79 80 if( this.languageCodeId == null ) 81 { 82 lEquals = lEquals && ( lTest.languageCodeId == null ); 83 } 84 else 85 { 86 lEquals = lEquals && this.languageCodeId.equals( lTest.languageCodeId ); 87 } 88 if( this.name == null ) 89 { 90 lEquals = lEquals && ( lTest.name == null ); 91 } 92 else 93 { 94 lEquals = lEquals && this.name.equals( lTest.name ); 95 } 96 97 return lEquals; 98 } 99 else 100 { 101 return false; 102 } 103 } 104 105 public int hashCode() 106 { 107 int result = 17; 108 109 result = 37*result + ((this.languageCodeId != null) ? this.languageCodeId.hashCode() : 0); 110 111 result = 37*result + ((this.name != null) ? this.name.hashCode() : 0); 112 113 return result; 114 } 115 116 } 117 | Popular Tags |