Interface JpaAttributeRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<AttributeEntity,,UUID> JpaAbstractAttributeRepository<AttributeEntity>,org.springframework.data.jpa.repository.JpaRepository<AttributeEntity,,UUID> org.springframework.data.repository.PagingAndSortingRepository<AttributeEntity,,UUID> org.springframework.data.repository.query.QueryByExampleExecutor<AttributeEntity>,org.springframework.data.repository.Repository<AttributeEntity,UUID>
@Repository
public interface JpaAttributeRepository
extends JpaAbstractAttributeRepository<AttributeEntity>
-
Method Summary
Modifier and TypeMethodDescriptionintcountAttributesByDataset(UUID datasetId) org.springframework.data.domain.Page<AttributeEntity> findByEntityAndTypeIds(UUID dslId, List<Long> typeIds, org.springframework.data.domain.Pageable pageable) getByDatasetId(UUID datasetId) getByDataSetListId(UUID dataSetListId) getByDataSetListIdIn(Collection<UUID> dataSetListIds) getByNameAndDataSetListId(String name, UUID dataSetListId) getBySourceIdAndDataSetListId(UUID sourceId, UUID dataSetListId) org.springframework.data.domain.Page<AttributeEntity> getByTypeDataSetListId(UUID dataSetListId, org.springframework.data.domain.Pageable pageable) getNotUsedByDatasetId(UUID datasetId) booleanisDifferentDslAttributes(UUID leftAttrId, UUID rightAttrId) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
getByNameAndDataSetListId
-
getByDataSetListId
-
getBySourceIdAndDataSetListId
-
getByDataSetListIdIn
-
getByTypeDataSetListId
org.springframework.data.domain.Page<AttributeEntity> getByTypeDataSetListId(UUID dataSetListId, org.springframework.data.domain.Pageable pageable) -
countAttributesByDataset
@Query(value="select count(a.id) from \"attribute\" a where datasetlist_id = (select d.datasetlist_id from dataset d where d.id = ?1)", nativeQuery=true) int countAttributesByDataset(UUID datasetId) -
getNotUsedByDatasetId
@Query(value="select * from \"attribute\" a where a.datasetlist_id = (select datasetlist_id from \"dataset\" d where d.id = ?1) and a.id not in (select attribute_id from \"parameter\" p where p.dataset_id = ?1)", nativeQuery=true) List<AttributeEntity> getNotUsedByDatasetId(UUID datasetId) -
getByDatasetId
@Query(value="select * from \"attribute\" a where a.datasetlist_id = (select d.datasetlist_id from dataset d where d.id = ?1)", nativeQuery=true) List<AttributeEntity> getByDatasetId(UUID datasetId) -
isDifferentDslAttributes
@Query(value="select \n (CASE WHEN leftAttr.type_datasetlist_id != rightAttr.type_datasetlist_id \n and leftAttr.attribute_type_id = 4 \n and leftAttr.attribute_type_id = rightAttr.attribute_type_id\n THEN true ELSE false END) AS is_equal\n from \n (select * from \"attribute\" a2 where id = ?1) as leftAttr,\n (select * from \"attribute\" a2 where id = ?2) as rightAttr", nativeQuery=true) boolean isDifferentDslAttributes(UUID leftAttrId, UUID rightAttrId) -
findByEntityAndTypeIds
@Query(value="SELECT * from \"attribute\" a WHERE a.datasetlist_id = ?1 AND a.attribute_type_id IN ?2 ORDER BY a.ordering", countQuery="SELECT COUNT(*) FROM \"attribute\" a WHERE a.datasetlist_id = ?1 AND a.attribute_type_id IN ?2", nativeQuery=true) org.springframework.data.domain.Page<AttributeEntity> findByEntityAndTypeIds(UUID dslId, List<Long> typeIds, org.springframework.data.domain.Pageable pageable)
-