Package org.qubership.atp.dataset.db.jpa
Class ModelsProvider
java.lang.Object
org.qubership.atp.dataset.db.jpa.ModelsProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JpaAttributeKeyRepositoryprotected JpaAttributeRepositoryprotected JpaAttributeTypeRepositoryprotected JpaDataSetListRepositoryprotected JpaDataSetRepositoryprotected JpaListValueRepositoryprotected JpaParameterRepositoryprotected JpaVisibilityAreaRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcountAttributes(UUID datasetId) createVisibilityArea(String name) New visibility area.getAffectedDataSetsIdsByDataSetListId(Set<UUID> dataSetListId) getAffectedDataSetsListIdsByDataSetListId(List<UUID> dataSetListId) org.springframework.data.domain.Page<DataSetEntity> getAllNamesByName(String name, org.springframework.data.domain.Pageable pageable) Visibility areas without order.Visibility areas ordered by name.getAttribute(AbstractUuidBasedEntity entity) Get or create delegate by entity.getAttributeByDataSetListId(UUID dataSetListId) Get an attribute by data set list id.getAttributeById(UUID uuid) getAttributeByNameAndDataSetListId(String name, UUID dataSetListId) Get an attribute with selected name and data set list id.getAttributeBySourceAndDataSetListId(UUID sourceId, UUID dataSetListId) Get an attribute with selected name and data set list id.Get or create delegate by entity.Gets attribute key by id.getAttributeKeyByKeyAndDataSetListIdAndDataSetIdAndAttributeId(String key, UUID dataSetListId, UUID datasetId, UUID attributeId) Get an attribute with selected key and data set list id and data set id and attribute id.getAttributeKeyBySourceAndDataSetListId(UUID sourceId, UUID dataSetListId) Get an attribute with selected name and data set list id.getAttributesByDataSetId(UUID dataSetId) getAttributesByDataSetListId(UUID dataSetListId) getAttributesByDataSetListIdIn(Collection<UUID> dataSetListIds) getAttributesByTypeDatasetListId(UUID dataSetListId, org.springframework.data.domain.Pageable pageable) Get attributes by type dataset list identifier.getAttributesKeyByDataSetId(UUID dataSetId) org.springframework.data.domain.Page<AttributeEntity> getAttributesPageableByDslId(UUID uuid, List<AttributeTypeName> attributeTypesToLoad, org.springframework.data.domain.Pageable pageable) Get pageable attributes.getAttributeTypeByAttributeId(UUID attributeId) getByAttributeIdAndText(UUID attributeId, String value) getByDataSetListId(UUID dataSetListId) Gets attribute keys by DSL id.getByDataSetListIdIn(Collection<UUID> dataSetListIds) getByIds(Collection<UUID> ids) getByVisibilityAreaId(UUID visibilityAreaId) getDataSet(AbstractUuidBasedEntity entity) Get or create delegate by entity.getDataSetById(UUID uuid) getDataSetByNameAndDataSetListId(String name, UUID uuid) getDataSetBySourceAndDataSetListId(UUID sourceId, UUID datasetId) Get or create delegate by entity.getDataSetListById(UUID uuid) getDataSetListByNameAndVisibilityAreaId(String name, UUID visibilityArea) Gets data set list by name and visibility area id.getDataSetListBySourceIdAndVisibilityAreaId(UUID sourceId, UUID visibilityArea) Gets data set list by source id and visibility area id .getDataSetListByVisibilityAreaId(UUID visibilityArea) Gets data set list visibility are id.getDataSetListIdsBySagaSessionIdIdAndVisibilityAreaId(UUID sagaSessionId, UUID visibilityAreaId) Gets data set lists by saga session id and visibility area id.getDatasetsByDataSetListId(UUID dataSetListId) org.springframework.data.domain.Page<AbstractEntityResponse> getDatasetsIdNamesPageByNameAndVaId(String name, UUID visibilityAreaId, org.springframework.data.domain.Pageable pageable) Get all DS (id, name) for visibility area and filter by name.getDataSetsIdsByDataSetListId(UUID dataSetListId) getDsNamesForDsl(UUID datasetListId) getLabel(AbstractUuidBasedEntity entity) Get or create delegate by entity.getListValue(AbstractUuidBasedEntity entity) Get or create delegate by entity.getListValueById(UUID id) Get or create delegate by entity.getListValueBySourceIdAndAttrId(UUID sourceId, UUID attributeId) Gets list value by source id and dataset id.getListValuesByAttributeId(UUID attributeId) getLockedDatasets(UUID dataSetListId) getNotUniqueDslNames(UUID visibilityArea) getNotUsedAttributesByDatasetId(UUID datasetId) getParameter(AbstractUuidBasedEntity entity) Get or create delegate by entity.getParameterByAttributeIdAndDataSetId(UUID attributeId, UUID dataSetId) Get Parameter by constraint fields sourceId and dataSetId.getParameterById(UUID uuid) getParameterBySourceIdAndDataSetId(UUID sourceId, UUID datasetId) Gets parameter by source id and dataset id.getParametersByDatasetId(UUID dataSetId, org.springframework.data.domain.Pageable pageable) Get parameters by type dataset identifier.getParametersIdByDsId(UUID dsId) getSortedOverlapParametersByDataSetId(UUID datasetId) getSortedParameterByDataSetId(UUID datasetId) getUniqueDataSetIdsByReferenceDataSetId(UUID dataSetId) Get or create delegate by entity.getVisibilityAreaById(UUID uuid) booleanisDslDifferentAttributes(UUID leftAttrId, UUID rightAttrId) booleanisDsLocked(UUID dataSetId) New visibility area.replicateAttribute(UUID id, String name, AttributeTypeName type, UUID dataSetListId, UUID sourceId) Replicate attribute attribute.replicateAttributeKey(UUID id, String key, UUID attributeId, UUID dataSetId, UUID dataSetListId, UUID sourceId) Replicate attribute key.replicateDataSet(UUID id, String name, UUID dataSetListId, Long ordering, UUID sourceId, Boolean isLocked) Create data set with requested id data set.replicateDataSetList(UUID id, String name, UUID visibilityAreaId, UUID sourceId, UUID createdBy, Timestamp createdWhen, UUID modifiedBy, Timestamp modifiedWhen) Create data set list with requested id data set list.replicateListValue(UUID id, String text, UUID attributeId, UUID sourceId) Replicate list value list value.replicateParameter(UUID id, UUID dataSetId, UUID attributeId, UUID sourceId) Replicate parameter parameter.
-
Field Details
-
dataSetListRepository
-
dataSetRepository
-
attributeRepository
-
attributeKeyRepository
-
visibilityAreaRepository
-
parameterRepository
-
listValueRepository
-
attributeTypeRepository
-
-
Constructor Details
-
ModelsProvider
public ModelsProvider()
-
-
Method Details
-
getDataSetListById
-
getAttributesPageableByDslId
public org.springframework.data.domain.Page<AttributeEntity> getAttributesPageableByDslId(UUID uuid, List<AttributeTypeName> attributeTypesToLoad, org.springframework.data.domain.Pageable pageable) Get pageable attributes.- Parameters:
uuid- dsl idattributeTypesToLoad- typespageable- page- Returns:
- page of attribute entities.
-
getAllVisibilityAreas
Visibility areas without order. -
getAllVisibilityAreasOrderedByNameAsc
Visibility areas ordered by name. -
getAttributeById
-
getParameterById
-
getParameterByAttributeIdAndDataSetId
Get Parameter by constraint fields sourceId and dataSetId. -
getDataSetById
-
getDataSetByNameAndDataSetListId
-
getDataSetByDataSetListId
-
getDatasetsByDataSetListId
-
getAttributesByDataSetListId
-
getAttributesByDataSetListIdIn
-
getDataSetBySourceAndDataSetListId
-
getVisibilityAreaById
-
getVisibilityAreaByName
-
createVisibilityArea
New visibility area. -
replicate
New visibility area. -
getAttribute
Get or create delegate by entity. -
getAttributeKey
Get or create delegate by entity. -
getAttributeKeyById
Gets attribute key by id.- Parameters:
id- the id- Returns:
- the attribute key by id
-
getByDataSetListId
Gets attribute keys by DSL id.- Parameters:
dataSetListId- the DSL id- Returns:
- the attribute key by id
-
getDataSet
Get or create delegate by entity. -
getDataSetList
Get or create delegate by entity. -
getLabel
Get or create delegate by entity. -
getParameter
Get or create delegate by entity. -
getVisibilityArea
Get or create delegate by entity. -
getListValue
Get or create delegate by entity. -
getDatasetsIdNamesPageByNameAndVaId
public org.springframework.data.domain.Page<AbstractEntityResponse> getDatasetsIdNamesPageByNameAndVaId(String name, UUID visibilityAreaId, org.springframework.data.domain.Pageable pageable) Get all DS (id, name) for visibility area and filter by name.- Parameters:
name- for filtering DSvisibilityAreaId- for filtering DSpageable- page request- Returns:
- datasets
-
getListValueById
Get or create delegate by entity. -
getAllNamesByName
public org.springframework.data.domain.Page<DataSetEntity> getAllNamesByName(String name, org.springframework.data.domain.Pageable pageable) -
replicateDataSetList
public DataSetList replicateDataSetList(UUID id, String name, UUID visibilityAreaId, UUID sourceId, UUID createdBy, Timestamp createdWhen, UUID modifiedBy, Timestamp modifiedWhen) throws DataSetServiceException Create data set list with requested id data set list.- Parameters:
id- the idname- the namevisibilityAreaId- the visibility area idsourceId- the source id- Returns:
- the data set list
- Throws:
DataSetServiceException- the data set service exception
-
replicateDataSet
public DataSet replicateDataSet(UUID id, String name, UUID dataSetListId, Long ordering, UUID sourceId, Boolean isLocked) throws DataSetServiceException Create data set with requested id data set.- Parameters:
id- the idname- the namedataSetListId- the data set list idsourceId- the source id- Returns:
- the data set
- Throws:
DataSetServiceException- the data set service exception
-
replicateAttribute
public Attribute replicateAttribute(UUID id, String name, AttributeTypeName type, UUID dataSetListId, UUID sourceId) throws DataSetServiceException Replicate attribute attribute.- Parameters:
id- the idname- the nametype- the typedataSetListId- the data set list idsourceId- the source id- Returns:
- the attribute
- Throws:
DataSetServiceException- the data set service exception
-
replicateParameter
public Parameter replicateParameter(UUID id, UUID dataSetId, UUID attributeId, UUID sourceId) throws DataSetServiceException Replicate parameter parameter.- Parameters:
id- the iddataSetId- the data set idattributeId- the attribute idsourceId- the source id- Returns:
- the parameter
- Throws:
DataSetServiceException- the data set service exception
-
replicateListValue
public ListValue replicateListValue(UUID id, String text, UUID attributeId, UUID sourceId) throws DataSetServiceException Replicate list value list value.- Parameters:
id- the idtext- the textattributeId- the attribute idsourceId- the sourceId- Returns:
- the list value
- Throws:
DataSetServiceException- the data set service exception
-
replicateAttributeKey
public AttributeKey replicateAttributeKey(UUID id, String key, UUID attributeId, UUID dataSetId, UUID dataSetListId, UUID sourceId) throws DataSetServiceException Replicate attribute key.- Parameters:
id- the idkey- the keyattributeId- the attribute iddataSetId- the data set iddataSetListId- the data set list idsourceId- the source id- Returns:
- the attribute key
- Throws:
DataSetServiceException- the data set service exception
-
getAttributeByNameAndDataSetListId
Get an attribute with selected name and data set list id.- Parameters:
name- the namedataSetListId- the data set list id- Returns:
- the by name and data set list id
-
getAttributeByDataSetListId
Get an attribute by data set list id.- Parameters:
dataSetListId- the data set list id- Returns:
- the by data set list id
-
getAttributeBySourceAndDataSetListId
Get an attribute with selected name and data set list id.- Parameters:
sourceId- the sourceIddataSetListId- the data set list id- Returns:
- the by name and data set list id
-
getAttributeKeyBySourceAndDataSetListId
public List<AttributeKey> getAttributeKeyBySourceAndDataSetListId(UUID sourceId, UUID dataSetListId) Get an attribute with selected name and data set list id.- Parameters:
sourceId- the sourceIddataSetListId- the data set list id- Returns:
- the by name and data set list id
-
getAttributeKeyByKeyAndDataSetListIdAndDataSetIdAndAttributeId
public AttributeKey getAttributeKeyByKeyAndDataSetListIdAndDataSetIdAndAttributeId(String key, UUID dataSetListId, UUID datasetId, UUID attributeId) Get an attribute with selected key and data set list id and data set id and attribute id.- Parameters:
key- the keydataSetListId- the data set list iddatasetId- the data set idattributeId- the attribute id- Returns:
AttributeKey
-
getDataSetListByNameAndVisibilityAreaId
Gets data set list by name and visibility area id.- Parameters:
name- the namevisibilityArea- the visibility area- Returns:
- collection of data set list by name and data set list id
-
getDataSetListByVisibilityAreaId
Gets data set list visibility are id.- Parameters:
visibilityArea- the visibility area- Returns:
- collection of data set list by name and data set list id
-
getAttributesByTypeDatasetListId
public PaginationResponse<TableResponse> getAttributesByTypeDatasetListId(UUID dataSetListId, org.springframework.data.domain.Pageable pageable) Get attributes by type dataset list identifier.- Parameters:
dataSetListId- dataset list identifierpageable- page request- Returns:
- result response
-
getParametersByDatasetId
public PaginationResponse<TableResponse> getParametersByDatasetId(UUID dataSetId, org.springframework.data.domain.Pageable pageable) Get parameters by type dataset identifier.- Parameters:
dataSetId- dataset identifierpageable- page request- Returns:
- result response
-
getDataSetListBySourceIdAndVisibilityAreaId
public List<DataSetList> getDataSetListBySourceIdAndVisibilityAreaId(UUID sourceId, UUID visibilityArea) Gets data set list by source id and visibility area id .- Parameters:
sourceId- the source idvisibilityArea- the visibility area- Returns:
- collection of data set list by name and data set list id
-
getDataSetListIdsBySagaSessionIdIdAndVisibilityAreaId
public Set<UUID> getDataSetListIdsBySagaSessionIdIdAndVisibilityAreaId(UUID sagaSessionId, UUID visibilityAreaId) Gets data set lists by saga session id and visibility area id.
Used in saga transactions.- Parameters:
sagaSessionId- the saga session idvisibilityAreaId- the visibility area id- Returns:
- collection of data set list
-
getParameterBySourceIdAndDataSetId
Gets parameter by source id and dataset id.- Parameters:
sourceId- the source iddatasetId- the visibility area- Returns:
- collection of parameters
-
getSortedParameterByDataSetId
-
getSortedOverlapParametersByDataSetId
-
getListValueBySourceIdAndAttrId
Gets list value by source id and dataset id.- Parameters:
sourceId- the source idattributeId- the attribute id- Returns:
- collection of list values
-
getByAttributeIdAndText
-
getListValuesByAttributeId
-
getByVisibilityAreaId
-
getByDataSetListIdIn
-
getByIds
-
getParametersIdByDsId
-
getLockedDatasets
-
getNotUniqueDslNames
-
getDsNamesForDsl
-
getDatasetListIdByDatasetId
-
getDataSetsListIdByDataSetId
-
getDataSetsIdsByDataSetListId
-
getAffectedDataSetsListIdsByDataSetListId
-
getAffectedDataSetsIdsByDataSetListId
-
countAttributes
-
getNotUsedAttributesByDatasetId
-
getAttributeTypeByAttributeId
-
getAttributesByDataSetId
-
getAttributesKeyByDataSetId
-
isDsLocked
-
isDslDifferentAttributes
-
getUniqueDataSetIdsByReferenceDataSetId
-