class RepositoryVersionDAO extends CrudDAO<RepositoryVersionEntity, Long> {

  @RequiresSession
  public List<RepositoryVersionEntity> findByStackAndType(StackId stackId, RepositoryType type) {
    final TypedQuery<RepositoryVersionEntity> query = entityManagerProvider.get().createNamedQuery(
        "repositoryVersionByStackAndType", RepositoryVersionEntity.class);
    query.setParameter("stackName", stackId.getStackName());
    query.setParameter("stackVersion", stackId.getStackVersion());
    query.setParameter("type", type);
    return daoUtils.selectList(query);
  }

  public  RepositoryVersionDAO();

}