/* * Generated by XDoclet - Do not edit! */ package org.jboss.test.cmp2.fkmapping.ejb; /** * Primary key for Institute. */ public class InstitutePK extends java.lang.Object implements java.io.Serializable { private int _hashCode = 0; private StringBuffer _toStringValue = null; public java.lang.String instituteId; public InstitutePK() { } public InstitutePK( java.lang.String instituteId ) { this.instituteId = instituteId; } public java.lang.String getInstituteId() { return instituteId; } public void setInstituteId(java.lang.String instituteId) { this.instituteId = instituteId; _hashCode = 0; } public int hashCode() { if( _hashCode == 0 ) { if (this.instituteId != null) _hashCode += this.instituteId.hashCode(); } return _hashCode; } public boolean equals(Object obj) { if( !(obj instanceof org.jboss.test.cmp2.fkmapping.ejb.InstitutePK) ) return false; org.jboss.test.cmp2.fkmapping.ejb.InstitutePK pk = (org.jboss.test.cmp2.fkmapping.ejb.InstitutePK)obj; boolean eq = true; if( obj == null ) { eq = false; } else { if( this.instituteId == null && ((org.jboss.test.cmp2.fkmapping.ejb.InstitutePK)obj).getInstituteId() == null ) { eq = true; } else { if( this.instituteId == null || ((org.jboss.test.cmp2.fkmapping.ejb.InstitutePK)obj).getInstituteId() == null ) { eq = false; } else { eq = eq && this.instituteId.equals( pk.instituteId ); } } } return eq; } /** @return String representation of this pk in the form of [.field1.field2.field3]. */ public String toString() { if( _toStringValue == null ) { _toStringValue = new StringBuffer("[."); _toStringValue.append(this.instituteId).append('.'); _toStringValue.append(']'); } return _toStringValue.toString(); } }