Package org.qubership.atp.dataset.db
Class AttributeRepository
java.lang.Object
org.qubership.atp.dataset.db.AbstractRepository
org.qubership.atp.dataset.db.AttributeRepository
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionAttributeRepository(com.querydsl.sql.SQLQueryFactory queryFactory, javax.inject.Provider<DataSetListRepository> dslRepo, javax.inject.Provider<ParameterRepository> paramRepo, javax.inject.Provider<ListValueRepository> lvRepo, CacheRepository cacheRepo) AttributeRepository. -
Method Summary
Modifier and TypeMethodDescriptioncreate(UUID dslId, Integer order, String name, AttributeType type, UUID dslRefId, List<String> listValues) Creates attribute.booleanCascade delete attributes.booleanexistsById(UUID id) getAll()getByParentId(UUID dslId) getByParentId(UUID dslId, AttributeType type) getEagerByParentId(UUID dslId) Sorted collection of attributes that matches DataSetList id.protected com.querydsl.sql.SQLQuery<Attribute> select(com.querydsl.core.types.Predicate predicate) protected longbooleanbooleanupdateDslRef(UUID id, UUID dataSetListId) voidupdateOrdering(List<Pair<UUID, Integer>> attributesOrdering) Update ordering of attributes.booleanupdateTypeDslId(UUID dslId, UUID id)
-
Field Details
-
queryFactory
protected final com.querydsl.sql.SQLQueryFactory queryFactory
-
-
Constructor Details
-
AttributeRepository
@Autowired public AttributeRepository(@Nonnull com.querydsl.sql.SQLQueryFactory queryFactory, @Nonnull javax.inject.Provider<DataSetListRepository> dslRepo, @Nonnull javax.inject.Provider<ParameterRepository> paramRepo, @Nonnull javax.inject.Provider<ListValueRepository> lvRepo, @Nonnull CacheRepository cacheRepo) AttributeRepository.
-
-
Method Details
-
create
@Nonnull public Attribute create(@Nonnull UUID dslId, @Nonnull Integer order, @Nonnull String name, @Nonnull AttributeType type, @Nullable UUID dslRefId, @Nullable List<String> listValues) Creates attribute.- Parameters:
dslRefId- if type ==AttributeType.DSL
-
updateTypeDslId
-
update
-
update
-
updateDslRef
-
getById
-
existsById
-
getByParentId
-
getByParentId
-
getEagerByParentId
Sorted collection of attributes that matches DataSetList id.- Parameters:
dslId- - DataSetList id.- Returns:
- sorted collection of Attribute.
-
getAll
-
select
@Nonnull protected com.querydsl.sql.SQLQuery<Attribute> select(@Nonnull com.querydsl.core.types.Predicate predicate) -
delete
Cascade delete attributes. Also removes list value, and parameters which bound to this attribute.- Parameters:
id- - attribute id.- Returns:
- true attribute removed and false if not deleted.
-
updateOrdering
Update ordering of attributes.- Parameters:
attributesOrdering- info about attributes for updating ({ID, ordering})
-