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
search
@Query("SELECT c FROM Customer c WHERE c.name LIKE :keyword OR c.firstname LIKE :keyword OR c.nic LIKE :keyword ORDER BY c.firstname DESC")
org.springframework.data.domain.Page<Customer>search(@Param("keyword")
String keyword,
org.springframework.data.domain.Pageable pageable)
checkIfNicExists
@Query("select case when count(c)>0 then true else false END from Customer c where c.nic=?1")
BooleancheckIfNicExists(String nic)