@RequiresSession
  public List<ExtensionLinkEntity> findByStack(String stackName, String stackVersion) {
    TypedQuery<ExtensionLinkEntity> query = entityManagerProvider.get().createNamedQuery(
        "ExtensionLinkEntity.findByStack", ExtensionLinkEntity.class);

    query.setParameter("stackName", stackName);
    query.setParameter("stackVersion", stackVersion);

    return daoUtils.selectList(query);
  }
Gets the extension links that match the specified stack name and version.

@return the extension links  matching the specified stack name and version if any.
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ExtensionLinkDAO.java