public boolean isAssociatedTo ( Class < ? extends Model > targetModelClass ) { if ( targetModelClass == null ) { throw new NullPointerException ( ) ; } for ( Association association : associations ) { if ( association . getTargetClass ( ) . getName ( ) . equals ( targetModelClass . getName ( ) ) ) { return true ; } } return false ; }
Checks if there is association to the target model class .