1 4 package org.jboss.test.cmp2.fkmapping.ejb; 5 6 9 public class ExamenationPK 10 extends java.lang.Object 11 implements java.io.Serializable 12 { 13 private int _hashCode = 0; 14 private StringBuffer _toStringValue = null; 15 16 public java.lang.String examId; 17 18 public ExamenationPK() 19 { 20 } 21 22 public ExamenationPK( java.lang.String examId ) 23 { 24 this.examId = examId; 25 } 26 27 public java.lang.String getExamId() 28 { 29 return examId; 30 } 31 32 public void setExamId(java.lang.String examId) 33 { 34 this.examId = examId; 35 _hashCode = 0; 36 } 37 38 public int hashCode() 39 { 40 if( _hashCode == 0 ) 41 { 42 if (this.examId != null) _hashCode += this.examId.hashCode(); 43 } 44 45 return _hashCode; 46 } 47 48 public boolean equals(Object obj) 49 { 50 if( !(obj instanceof org.jboss.test.cmp2.fkmapping.ejb.ExamenationPK) ) 51 return false; 52 53 org.jboss.test.cmp2.fkmapping.ejb.ExamenationPK pk = (org.jboss.test.cmp2.fkmapping.ejb.ExamenationPK)obj; 54 boolean eq = true; 55 56 if( obj == null ) 57 { 58 eq = false; 59 } 60 else 61 { 62 if( this.examId == null && ((org.jboss.test.cmp2.fkmapping.ejb.ExamenationPK)obj).getExamId() == null ) 63 { 64 eq = true; 65 } 66 else 67 { 68 if( this.examId == null || ((org.jboss.test.cmp2.fkmapping.ejb.ExamenationPK)obj).getExamId() == null ) 69 { 70 eq = false; 71 } 72 else 73 { 74 eq = eq && this.examId.equals( pk.examId ); 75 } 76 } 77 } 78 79 return eq; 80 } 81 82 83 public String toString() 84 { 85 if( _toStringValue == null ) 86 { 87 _toStringValue = new StringBuffer ("[."); 88 _toStringValue.append(this.examId).append('.'); 89 _toStringValue.append(']'); 90 } 91 92 return _toStringValue.toString(); 93 } 94 95 } 96 | Popular Tags |