Interface CostCenterRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<CostCenter,CostCenter.Id>, org.springframework.data.jpa.repository.JpaRepository<CostCenter,CostCenter.Id>, org.springframework.data.repository.ListCrudRepository<CostCenter,CostCenter.Id>, org.springframework.data.repository.ListPagingAndSortingRepository<CostCenter,CostCenter.Id>, org.springframework.data.repository.PagingAndSortingRepository<CostCenter,CostCenter.Id>, org.springframework.data.repository.query.QueryByExampleExecutor<CostCenter>, org.springframework.data.repository.Repository<CostCenter,CostCenter.Id>

public interface CostCenterRepository extends org.springframework.data.jpa.repository.JpaRepository<CostCenter,CostCenter.Id>
  • Method Summary

    Modifier and Type
    Method
    Description
     
    findByIdAndActive(CostCenter.Id Id, boolean active)
     

    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

    • findAllByOrganisationIdWithParentAndChildren

      @Query("SELECT DISTINCT t FROM CostCenter t LEFT JOIN FETCH t.parent LEFT JOIN FETCH t.children WHERE t.id.organisationId = :organisationId") Set<CostCenter> findAllByOrganisationIdWithParentAndChildren(@Param("organisationId") String organisationId)
    • findByIdAndActive

      @Query("SELECT t FROM CostCenter t WHERE t.id = :Id AND t.active = :active ") Optional<CostCenter> findByIdAndActive(@Param("Id") CostCenter.Id Id, @Param("active") boolean active)