@RequiresSession
  public List<ArtifactEntity> findByName(String artifactName) {
    TypedQuery<ArtifactEntity> query = entityManagerProvider.get().
        createNamedQuery("artifactByName", ArtifactEntity.class);
    query.setParameter("artifactName", artifactName);

    return query.getResultList();
  }
Find all artifacts for the specified artifact name.

@param artifactName name of artifact to find
@return all artifacts with the specified artifact name or an empty List
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ArtifactDAO.java