@RequiresSession
  public List<ArtifactEntity> findByForeignKeys(TreeMap<String, String> foreignKeys) {
    TypedQuery<ArtifactEntity> query = entityManagerProvider.get().
        createNamedQuery("artifactByForeignKeys", ArtifactEntity.class);
    query.setParameter("foreignKeys", ArtifactEntity.serializeForeignKeys(foreignKeys));

    return query.getResultList();
  }
Find all artifacts for the specified foreign keys.

@param foreignKeys  foreign keys of artifact as json representation of
                    a map of key properties to values

@return all artifacts for the specified foreign keys or an empty List
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ArtifactDAO.java