@Test public void testDelete() { createSingleRecord(); Assert.assertNotNull(repositoryVersionDAO.findByStackAndVersion(HDP_206, "version")); final RepositoryVersionEntity entity = repositoryVersionDAO.findByStackAndVersion( HDP_206, "version"); repositoryVersionDAO.remove(entity); Assert.assertNull(repositoryVersionDAO.findByStackAndVersion(HDP_206, "version")); }
@RequiresSession public RepositoryVersionEntity findByStackAndVersion(StackId stackId, String version) { return findByStackNameAndVersion(stackId.getStackName(), version); }
RepositoryVersionDAO extends CrudDAO<RepositoryVersionEntity, Long> { @RequiresSession public RepositoryVersionEntity findByStackAndVersion(StackId stackId, String version) { return findByStackNameAndVersion(stackId.getStackName(), version); } }
RepositoryVersionDAO extends CrudDAO<RepositoryVersionEntity, Long> { @RequiresSession public RepositoryVersionEntity findByStackAndVersion(StackId stackId, String version) { return findByStackNameAndVersion(stackId.getStackName(), version); } RepositoryVersionDAO(); }
RepositoryVersionDAO extends CrudDAO<RepositoryVersionEntity, Long> { @RequiresSession public RepositoryVersionEntity findByStackAndVersion(StackId stackId, String version) { return findByStackNameAndVersion(stackId.getStackName(), version); } RepositoryVersionDAO(); @Override @Transactional void create(RepositoryVersionEntity entity); @RequiresSession RepositoryVersionEntity findByDisplayName(String displayName); @RequiresSession RepositoryVersionEntity findByStackAndVersion(StackId stackId,
      String version); @RequiresSession RepositoryVersionEntity findByStackAndVersion(StackEntity stackEntity,
      String version); @RequiresSession RepositoryVersionEntity findByStackNameAndVersion(String stackName, String version); @RequiresSession List<RepositoryVersionEntity> findByStack(StackId stackId); RepositoryVersionEntity create(StackEntity stackEntity,
      String version, String displayName,
      String operatingSystems); @Transactional RepositoryVersionEntity create(StackEntity stackEntity,
      String version, String displayName,
      String operatingSystems, RepositoryType type); @RequiresSession List<RepositoryVersionEntity> findAllDefinitions(); }
RepositoryVersionDAO extends CrudDAO<RepositoryVersionEntity, Long> { @RequiresSession public RepositoryVersionEntity findByStackAndVersion(StackId stackId, String version) { return findByStackNameAndVersion(stackId.getStackName(), version); } RepositoryVersionDAO(); @Override @Transactional void create(RepositoryVersionEntity entity); @RequiresSession RepositoryVersionEntity findByDisplayName(String displayName); @RequiresSession RepositoryVersionEntity findByStackAndVersion(StackId stackId,
      String version); @RequiresSession RepositoryVersionEntity findByStackAndVersion(StackEntity stackEntity,
      String version); @RequiresSession RepositoryVersionEntity findByStackNameAndVersion(String stackName, String version); @RequiresSession List<RepositoryVersionEntity> findByStack(StackId stackId); RepositoryVersionEntity create(StackEntity stackEntity,
      String version, String displayName,
      String operatingSystems); @Transactional RepositoryVersionEntity create(StackEntity stackEntity,
      String version, String displayName,
      String operatingSystems, RepositoryType type); @RequiresSession List<RepositoryVersionEntity> findAllDefinitions();  }