Class TestPlanRepository

java.lang.Object
org.qubership.atp.dataset.db.AbstractRepository
org.qubership.atp.dataset.db.TestPlanRepository

@Repository public class TestPlanRepository extends AbstractRepository
  • Constructor Details

    • TestPlanRepository

      @Autowired public TestPlanRepository(@Nonnull com.querydsl.sql.SQLQueryFactory queryFactory, @Nonnull CacheRepository cacheRepo, @Nonnull javax.inject.Provider<VisibilityAreaRepository> visibilityAreaRepo, @Nonnull javax.inject.Provider<DataSetListRepository> dslRepo)
      visibility area repository.
  • Method Details

    • create

      @Nonnull public com.mysema.commons.lang.Pair<TestPlan,Boolean> create(@Nonnull String name, @Nonnull UUID visibilityAreaId)
      Creates new test plan.
      Parameters:
      name - name of test plan.
      visibilityAreaId - va where to create test plan.
    • getById

      @Nullable public TestPlan getById(@Nonnull UUID id)
      Get test plan by id.
    • existsById

      public boolean existsById(UUID id)
    • getAll

      @Nonnull public List<TestPlan> getAll(@Nonnull UUID visibilityArea)
      Get all test plans under va.
      Parameters:
      visibilityArea - va
      Returns:
      list of test plans
    • getAll

      @Nonnull public List<TestPlan> getAll()
      Get all test plans.
    • select

      @Nonnull protected com.querydsl.sql.SQLQuery<TestPlan> select(@Nonnull com.querydsl.core.types.Predicate predicate)
    • rename

      public boolean rename(@Nonnull UUID id, @Nonnull String name)
      Rename test plan.
      Parameters:
      id - id of test plan.
      name - new name.
      Returns:
      true if operation is successful.
    • delete

      public boolean delete(@Nonnull UUID id, UUID modifiedBy, Timestamp modifiedWhen)
      Cascade delete of testplans.
    • delete

      public boolean delete(@Nonnull UUID vaId, @Nonnull String name, UUID modifiedBy, Timestamp modifiedWhen)
      Delete TestPlan by name under VisibilityArea.
      Parameters:
      vaId - VisibilityArea id
      name - test plan name
      Returns:
      true if test plan was deleted successfully and false if nothing deleted.
    • getByNameUnderVisibilityArea

      public TestPlan getByNameUnderVisibilityArea(UUID visibilityArea, String name)
      Returns TestPlan by name under VisibilityArea.
      Parameters:
      visibilityArea - current VA
      name - test plan name
      Returns:
      test plan