Package org.qubership.atp.dataset.db
Class TestPlanRepository
java.lang.Object
org.qubership.atp.dataset.db.AbstractRepository
org.qubership.atp.dataset.db.TestPlanRepository
-
Field Summary
Fields inherited from class org.qubership.atp.dataset.db.AbstractRepository
AK, ATTR, DS, DSL, DSLABEL, DSLLABEL, FILTER_DS_LABELS, FILTER_DSL_LABELS, FILTERS, LABEL, LV, PARAM, TEST_PLAN, VA -
Constructor Summary
ConstructorsConstructorDescriptionTestPlanRepository(com.querydsl.sql.SQLQueryFactory queryFactory, CacheRepository cacheRepo, javax.inject.Provider<VisibilityAreaRepository> visibilityAreaRepo, javax.inject.Provider<DataSetListRepository> dslRepo) visibility area repository. -
Method Summary
Modifier and TypeMethodDescriptionCreates new test plan.booleanDeleteTestPlanby name underVisibilityArea.booleanCascade delete of testplans.booleanexistsById(UUID id) getAll()Get all test plans.Get all test plans under va.Get test plan by id.getByNameUnderVisibilityArea(UUID visibilityArea, String name) ReturnsTestPlanby name underVisibilityArea.booleanRename test plan.protected com.querydsl.sql.SQLQuery<TestPlan> select(com.querydsl.core.types.Predicate predicate)
-
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
Get test plan by id. -
existsById
-
getAll
Get all test plans under va.- Parameters:
visibilityArea- va- Returns:
- list of test plans
-
getAll
Get all test plans. -
select
@Nonnull protected com.querydsl.sql.SQLQuery<TestPlan> select(@Nonnull com.querydsl.core.types.Predicate predicate) -
rename
Rename test plan.- Parameters:
id- id of test plan.name- new name.- Returns:
- true if operation is successful.
-
delete
Cascade delete of testplans. -
delete
public boolean delete(@Nonnull UUID vaId, @Nonnull String name, UUID modifiedBy, Timestamp modifiedWhen) DeleteTestPlanby name underVisibilityArea.- Parameters:
vaId- VisibilityArea idname- test plan name- Returns:
trueif test plan was deleted successfully andfalseif nothing deleted.
-
getByNameUnderVisibilityArea
ReturnsTestPlanby name underVisibilityArea.- Parameters:
visibilityArea- current VAname- test plan name- Returns:
- test plan
-