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

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

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

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