public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
SecurityEntityRelationType other = (SecurityEntityRelationType) obj;
if (relationType == null)
{
if (other.getRelationType() != null) return false;
} else if (!relationType.equals(other.getRelationType())) return false;
if (sourceEntityType == null)
{
if (other.getFromEntityType() != null) return false;
} else if (!sourceEntityType.equals(other.getFromEntityType()))
return false;
if (targetEntityType == null)
{
if (other.getToEntityType() != null) return false;
} else if (!targetEntityType.equals(other.getToEntityType()))
return false;
return true;
}