Interface NomenclatureRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<NomenclatureEntity, Long>, org.springframework.data.jpa.repository.JpaRepository<NomenclatureEntity, Long>, org.springframework.data.repository.ListCrudRepository<NomenclatureEntity, Long>, org.springframework.data.repository.ListPagingAndSortingRepository<NomenclatureEntity, Long>, org.springframework.data.repository.PagingAndSortingRepository<NomenclatureEntity, Long>, org.springframework.data.repository.query.QueryByExampleExecutor<NomenclatureEntity>, org.springframework.data.repository.Repository<NomenclatureEntity, Long>
public interface NomenclatureRepository
extends org.springframework.data.jpa.repository.JpaRepository<NomenclatureEntity, Long>
-
Method Summary
Modifier and TypeMethodDescriptionlongbooleanexistsByCode(String code) booleanexistsByParentId(Long parentId) 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, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods 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
-
findAllByOrderByCodeAsc
List<NomenclatureEntity> findAllByOrderByCodeAsc() -
existsByCode
-
existsByParentId
@Query("select count(n) > 0 from NomenclatureEntity n where n.parent.id = :parentId") boolean existsByParentId(Long parentId) -
lockForest
@Lock(PESSIMISTIC_WRITE) @Query("select n from NomenclatureEntity n order by n.id") List<NomenclatureEntity> lockForest() -
countTaskReferences
@Query(value="select count(*) from tasks where nomenclature_id = :id", nativeQuery=true) long countTaskReferences(Long id)
-