Class DataSetListRepository

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

@Repository public class DataSetListRepository extends AbstractRepository
  • 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

      @Nullable public DataSetList getById(@Nonnull UUID id)
    • getAll

      @Nonnull public List<DataSetList> getAll()
    • getAll

      @Nonnull public List<DataSetList> getAll(@Nonnull UUID visibilityArea)
    • getAll

      @Nonnull public List<DataSetList> getAll(@Nonnull List<UUID> datasetListIds)
    • 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

      public boolean delete(@Nonnull UUID id)
      Cascade delete of dataset. Method will remove all referenced parameters, attributes, parameters, labels.
    • getByNameUnderVisibilityArea

      public DataSetList getByNameUnderVisibilityArea(UUID visibilityArea, String name)
      Returns DataSetList by name under VisibilityArea.
      Parameters:
      visibilityArea - current VA
      name - 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

      @Nonnull public List<Label> getLabels(@Nonnull UUID dslId)
    • getAllByLabel

      @Nonnull public List<DataSetList> getAllByLabel(@Nonnull UUID visibilityArea, @Nonnull String labelName)
    • getUnderTestPlan

      public List<DataSetList> getUnderTestPlan(UUID testPlanId)
    • onTestPlanDeleteCascade

      public void onTestPlanDeleteCascade(UUID testPlanId, UUID modifiedBy, Timestamp modifiedWhen)
      Deletes test plan for DSL.
    • updateModifiedFields

      public void updateModifiedFields(UUID dataSetListId, UUID modifiedBy, Timestamp modifiedWhen)
      Updates modifiedBy and modifiedWhen fields.
    • getAffectedAttributes

      public List<TableResponse> getAffectedAttributes(UUID dataSetListId, Integer page, Integer size)
      Get attributes affected by dsl.
    • existsById

      public boolean existsById(@Nonnull UUID dataSetListId)
      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 id
      limit - number of rows that are returned
      offset - number of rows that are skipped
      Returns:
      list with DSL id and DSL name
    • getModifiedWhen

      public Timestamp getModifiedWhen(UUID dataSetListId)
      Get modifiedWhen by dataSetListId.
      Parameters:
      dataSetListId - dataSetListId
      Returns:
      Timestamp of modified