Package org.qubership.atp.dataset.db
Class DataSetListRepository
java.lang.Object
org.qubership.atp.dataset.db.AbstractRepository
org.qubership.atp.dataset.db.DataSetListRepository
-
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
ConstructorsConstructorDescriptionDataSetListRepository(com.querydsl.sql.SQLQueryFactory queryFactory, javax.inject.Provider<VisibilityAreaRepository> vaRepo, javax.inject.Provider<DataSetRepository> dsRepo, javax.inject.Provider<AttributeRepository> attrRepo, javax.inject.Provider<LabelRepository> labelRepo, CacheRepository cacheRepo, javax.inject.Provider<TestPlanRepository> testPlanRepo) data set list repository. -
Method Summary
Modifier and TypeMethodDescriptionCreates data set list.booleanCascade delete of dataset.booleanexistsById(UUID dataSetListId) Check if dsl exists.getAffectedAttributes(UUID dataSetListId, Integer page, Integer size) Get attributes affected by dsl.getAffectedDataSetLists(UUID dataSetListId, Integer limit, Integer offset) Get affected DSL by dataSetListId.getAll()getAllByLabel(UUID visibilityArea, String labelName) getByNameUnderVisibilityArea(UUID visibilityArea, String name) ReturnsDataSetListby name underVisibilityArea.getModifiedWhen(UUID dataSetListId) Get modifiedWhen by dataSetListId.getUnderTestPlan(UUID testPlanId) Adds new dataSetListLabel.voidonTestPlanDeleteCascade(UUID testPlanId, UUID modifiedBy, Timestamp modifiedWhen) Deletes test plan for DSL.booleanRename dsl.protected com.querydsl.sql.SQLQuery<DataSetList> select(com.querydsl.core.types.Predicate predicate) booleansetTestPlan(UUID id, UUID testPlanId, UUID modifiedBy, Timestamp modifiedWhen) Update or add test plan id in dsl.booleanDeletes dataSetListLabel.voidupdateModifiedFields(UUID dataSetListId, UUID modifiedBy, Timestamp modifiedWhen) Updates modifiedBy and modifiedWhen fields.
-
Constructor Details
-
DataSetListRepository
@Autowired public DataSetListRepository(@Nonnull com.querydsl.sql.SQLQueryFactory queryFactory, @Nonnull javax.inject.Provider<VisibilityAreaRepository> vaRepo, @Nonnull javax.inject.Provider<DataSetRepository> dsRepo, @Nonnull javax.inject.Provider<AttributeRepository> attrRepo, @Nonnull javax.inject.Provider<LabelRepository> labelRepo, @Nonnull CacheRepository cacheRepo, @Nonnull javax.inject.Provider<TestPlanRepository> testPlanRepo) data set list repository.- Parameters:
queryFactory- is used for creating sql queries.
-
-
Method Details
-
create
@Nonnull public DataSetList create(@Nonnull UUID visibilityAreaId, @Nonnull String name, @Nullable UUID testPlanId, @Nonnull UUID createdBy, @Nonnull Timestamp createdWhen) Creates data set list. -
getById
-
getAll
-
getAll
-
getAll
-
select
@Nonnull protected com.querydsl.sql.SQLQuery<DataSetList> select(@Nonnull com.querydsl.core.types.Predicate predicate) -
rename
public boolean rename(@Nonnull UUID id, @Nonnull String name, UUID modifiedBy, Timestamp modifiedWhen) Rename dsl. -
setTestPlan
public boolean setTestPlan(@Nonnull UUID id, @Nullable UUID testPlanId, UUID modifiedBy, Timestamp modifiedWhen) Update or add test plan id in dsl. -
delete
Cascade delete of dataset. Method will remove all referenced parameters, attributes, parameters, labels. -
getByNameUnderVisibilityArea
ReturnsDataSetListby name underVisibilityArea.- Parameters:
visibilityArea- current VAname- dslName- Returns:
- dsl
-
mark
@Nonnull public Label mark(@Nonnull UUID dslId, @Nonnull String labelName, UUID modifiedBy, Timestamp modifiedWhen) Adds new dataSetListLabel. -
unmark
public boolean unmark(@Nonnull UUID dslId, @Nonnull UUID labelId, UUID modifiedBy, Timestamp modifiedWhen) Deletes dataSetListLabel. -
getLabels
-
getAllByLabel
@Nonnull public List<DataSetList> getAllByLabel(@Nonnull UUID visibilityArea, @Nonnull String labelName) -
getUnderTestPlan
-
onTestPlanDeleteCascade
Deletes test plan for DSL. -
updateModifiedFields
Updates modifiedBy and modifiedWhen fields. -
getAffectedAttributes
Get attributes affected by dsl. -
existsById
Check if dsl exists.- Parameters:
dataSetListId- DSL id- Returns:
- 'true' if dsl exists, otherwise 'false'
-
getAffectedDataSetLists
public List<AffectedDataSetList> getAffectedDataSetLists(UUID dataSetListId, Integer limit, Integer offset) Get affected DSL by dataSetListId.- Parameters:
dataSetListId- DSL idlimit- number of rows that are returnedoffset- number of rows that are skipped- Returns:
- list with DSL id and DSL name
-
getModifiedWhen
Get modifiedWhen by dataSetListId.- Parameters:
dataSetListId- dataSetListId- Returns:
Timestampof modified
-