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 .