Package org.qubership.atp.dataset.db
Class ParameterRepository
java.lang.Object
org.qubership.atp.dataset.db.AbstractRepository
org.qubership.atp.dataset.db.ParameterRepository
-
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
ConstructorsModifierConstructorDescriptionprotectedParameterRepository(com.querydsl.sql.SQLQueryFactory queryFactory, DataSetRepository dsRepo, ListValueRepository lvRepo, AttributeRepository attrRepo, AttributePathRepository attrPathRepo, GridFsRepository gridFsRepoProvider, CacheRepository cacheRepo, ClearCacheService clearCacheService) -
Method Summary
Modifier and TypeMethodDescriptioncreate(UUID dsId, UUID attributeId, ParameterDataDto data) booleanDeletes parameter.voiddeleteOverlap(UUID dataSetListId, UUID dataSetId, UUID targetAttributeId, List<UUID> attributePathIds) Deletes overlapped parameter.voiddeleteOverlaps(UUID targetAttributeId, Predicate<AttributePath> filter) Deletes all overlapped parameters for target attribute id by predicate.booleanexistsById(UUID id) findAllByListValueId(UUID listValueId) findAllByListValueIdsWithDataSetList(List<UUID> listValueIds) To find information about dataset list, dataset and attribute of dependant list value ids.List<?> findAllByListValueIdWithDataSetList(UUID listValueId) To find information about dataset list, dataset and attribute of dependant list value id.getAll()getByAttributeId(UUID attributeId) getByAttributeIdAndDatasetIds(UUID attributeId, Set<UUID> datasetIds) getByDataSetIdAttributeId(UUID dataSetId, UUID attributeId) Loads parameter from repository and returns parameter as Overlapped parameter.getOverlaps(UUID targetAttributeId, Predicate<AttributePath> filter) Get overridden parameters.overlap(UUID dslId, UUID dsId, UUID attributeId, ParameterDataDto data, List<UUID> attributePathIds) Creates and returns overlapped parameter.booleanupdate(List<UUID> parameterIds, ParameterDataDto data) Updates data of a parameters.booleanupdate(UUID paramId, ParameterDataDto data) Update parameter.update(Parameter parameter, ParameterDataDto data) Updates data of a parameter.
-
Constructor Details
-
ParameterRepository
@Autowired protected ParameterRepository(com.querydsl.sql.SQLQueryFactory queryFactory, DataSetRepository dsRepo, ListValueRepository lvRepo, AttributeRepository attrRepo, AttributePathRepository attrPathRepo, GridFsRepository gridFsRepoProvider, CacheRepository cacheRepo, ClearCacheService clearCacheService)
-
-
Method Details
-
create
@Nonnull public Parameter create(@Nonnull UUID dsId, @Nonnull UUID attributeId, @Nonnull ParameterDataDto data) -
overlap
@Nonnull public ParameterOverlap overlap(@Nonnull UUID dslId, @Nonnull UUID dsId, @Nonnull UUID attributeId, @Nonnull ParameterDataDto data, @Nonnull List<UUID> attributePathIds) Creates and returns overlapped parameter.- Parameters:
dslId- - parentDataSetListdsId- - targetDataSetattributeId- - target attributedata- - parameter valueattributePathIds- - path to original value.- Returns:
- - overlapped parameter.
-
update
@Nonnull @CacheEvict(value="ATP_DATASETS_PARAMETER_CACHE_OS", key="#parameter.getId()") public Parameter update(@Nonnull Parameter parameter, @Nonnull ParameterDataDto data) Updates data of a parameter.- Returns:
- new parameter with updated data.
-
update
Updates data of a parameters.- Returns:
- true if anything was updated.
-
update
Update parameter. -
getById
-
existsById
-
getByAttributeId
-
getByDataSetIdAttributeId
-
getByAttributeIdAndDatasetIds
-
getOverlap
@Nullable public ParameterOverlap getOverlap(@Nonnull UUID dslId, @Nonnull UUID dsId, @Nonnull UUID attributeId, @Nonnull List<UUID> attributePathIds) Loads parameter from repository and returns parameter as Overlapped parameter. -
getAll
-
getOverlaps
@Nonnull public Stream<ParameterOverlap> getOverlaps(@Nonnull UUID targetAttributeId, Predicate<AttributePath> filter) Get overridden parameters.- Returns:
ParameterOverlaps of target attribute
-
deleteOverlaps
Deletes all overlapped parameters for target attribute id by predicate. -
deleteOverlap
public void deleteOverlap(@Nonnull UUID dataSetListId, @Nonnull UUID dataSetId, @Nonnull UUID targetAttributeId, @Nonnull List<UUID> attributePathIds) Deletes overlapped parameter. -
delete
Deletes parameter. It can be Simple parameter or Overlapped parameter. -
findAllByListValueId
-
findAllByListValueIdWithDataSetList
To find information about dataset list, dataset and attribute of dependant list value id. -
findAllByListValueIdsWithDataSetList
To find information about dataset list, dataset and attribute of dependant list value ids.
-