Interface TaxBandRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<TaxBand,,Integer> org.springframework.data.repository.PagingAndSortingRepository<TaxBand,,Integer> org.springframework.data.repository.Repository<TaxBand,Integer>
public interface TaxBandRepository
extends org.springframework.data.repository.CrudRepository<TaxBand,Integer>, org.springframework.data.repository.PagingAndSortingRepository<TaxBand,Integer>
Repository for interacting with the tax_band table in postgres.
-
Method Summary
Modifier and TypeMethodDescriptionFind an individual tax band based on its id - used by the service class for retrieving a band to be updated.findTaxBandsByDescriptionContainsIgnoreCase(String description) Queries the tax band table to retrieve any that contain the description passed as an argument.
Implemented to enable partial searches by any user who may want to search for various options but dont have the precise name.Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findAll, findAllById, findById, save, saveAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll, findAll
-
Method Details
-
findDistinctById
Find an individual tax band based on its id - used by the service class for retrieving a band to be updated.- Parameters:
id- id of the tax band being searched for- Returns:
- individual tax band
-
findTaxBandsByDescriptionContainsIgnoreCase
Queries the tax band table to retrieve any that contain the description passed as an argument.
Implemented to enable partial searches by any user who may want to search for various options but dont have the precise name.- Parameters:
description- string which is to be used for a partial match- Returns:
- a list of tax bands which are deemed to be partial matches with the search term
-