Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.mycompany.test.spring.boot.jpa.service; import com.mycompany.test.spring.boot.jpa.domain.City; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.repository.Repository; interface CityRepository extends Repository<City, Long> { Page<City> findAll(Pageable pageable); City save(City city); Page<City> findByNameContainingAndCountryContainingAllIgnoringCase(String name, String country, Pageable pageable); City findByNameAndCountryAllIgnoringCase(String name, String country); }