/** Overrides MappingElementImpl's <code>equals</code> method to add * comparison of the name of the declaring class this mapping element. * The method returns <code>false</code> if obj does not have a declaring * class with the same name as this mapping element. * @return <code>true</code> if this object is the same as the obj argument; * <code>false</code> otherwise. * @param obj the reference object with which to compare. */ public boolean equals (Object obj) { if (super.equals(obj) && (obj instanceof MappingMemberElement)) { MappingClassElement declaringClass = getDeclaringClass(); MappingClassElement objDeclaringClass = ((MappingMemberElement)obj).getDeclaringClass(); return ((declaringClass == null) ? (objDeclaringClass == null) : declaringClass.equals(objDeclaringClass)); } return false; }
/** Overrides MappingElementImpl's <code>equals</code> method to add * comparison of the name of the declaring class this mapping element. * The method returns <code>false</code> if obj does not have a declaring * class with the same name as this mapping element. * @return <code>true</code> if this object is the same as the obj argument; * <code>false</code> otherwise. * @param obj the reference object with which to compare. */ public boolean equals (Object obj) { if (super.equals(obj) && (obj instanceof MappingMemberElement)) { MappingClassElement declaringClass = getDeclaringClass(); MappingClassElement objDeclaringClass = ((MappingMemberElement)obj).getDeclaringClass(); return ((declaringClass == null) ? (objDeclaringClass == null) : declaringClass.equals(objDeclaringClass)); } return false; }