code: public <A extends Association> A getAssociationForTarget(Class<? extends Model> targetClass){
          Association result = null;
          for (Association association : associations) {
              if (association.getTargetClass().getName().equals(targetClass.getName())) {
                  result = association; break;
              }
          }
          return (A) result;
      }
docs: Returns association of this table with the target table. Will return null if there is no association.
  
  @param targetClass association of this model and the target model.
  @return association of this table with the target table. Will return null if there is no association with target
  table and specified type.