public boolean hasReferenceTo(EntitySpec entitySpec) {
        if (entitySpec == null) {
            throw new IllegalArgumentException("entitySpec cannot be null");
        }

        boolean found = false;
        String entitySpecName = entitySpec.name;
        for (ReferenceSpec refSpec : this.referenceSpecs) {
            if (refSpec.getEntityName().equals(entitySpecName)) {
                found = true;
                continue;
            }
        }
        return found;
    }
public boolean hasReferenceTo ( EntitySpec entitySpec ) { if ( entitySpec == null ) { throw new IllegalArgumentException ( "entitySpec cannot be null" ) ; } boolean found = false ; String entitySpecName = entitySpec . name ; for ( ReferenceSpec refSpec : this . referenceSpecs ) { if ( refSpec . getEntityName ( ) . equals ( entitySpecName ) ) { found = true ; continue ; } } return found ; }
Returns whether this entity spec has a reference to another entity spec.

@param entitySpec another entity spec.
@return <code>true</code> or <code>false</code>.