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 Type
    Method
    Description
    Finds an individual Vehicle based on their registration number being an exact match, ignoring the case.
    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, saveAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll, findAll
  • Method Details

    • findByRegNumberEqualsIgnoreCase

      Vehicle findByRegNumberEqualsIgnoreCase(String regNumber)
      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

      List<Vehicle> 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.
      Parameters:
      localDate - the date to find tax due dates before
      Returns:
      list of vehicles