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 Type
    Method
    Description
    long
     
    boolean
     
    boolean
     
     
     

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findAllByOrderByCodeAsc

      List<NomenclatureEntity> findAllByOrderByCodeAsc()
    • existsByCode

      boolean existsByCode(String code)
    • 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)