Interface VehicleRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Vehicle,,String> org.springframework.data.repository.PagingAndSortingRepository<Vehicle,,String> org.springframework.data.repository.Repository<Vehicle,String>
public interface VehicleRepository
extends org.springframework.data.repository.CrudRepository<Vehicle,String>, org.springframework.data.repository.PagingAndSortingRepository<Vehicle,String>
Repository for interacting with the vehicle table in postgres.
-
Method Summary
Modifier and TypeMethodDescriptionfindByRegNumberEqualsIgnoreCase(String regNumber) Finds an individual Vehicle based on their registration number being an exact match, ignoring the case.findVehiclesByTaxDueDateIsBefore(LocalDate localDate) Finds all vehicles which have a tax due date due before the date provided as a method parameter.
Currently only used for finding overdue payments as the method calling this method using the current date stamp whenever called.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
-
findByRegNumberEqualsIgnoreCase
Finds an individual Vehicle based on their registration number being an exact match, ignoring the case.- Parameters:
regNumber- the vehicle's registration number- Returns:
- the vehicle
-
findVehiclesByTaxDueDateIsBefore
Finds all vehicles which have a tax due date due before the date provided as a method parameter.
Currently only used for finding overdue payments as the method calling this method using the current date stamp whenever called.- Parameters:
localDate- the date to find tax due dates before- Returns:
- list of vehicles
-