Interface WeatherReportRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<WeatherReport,Integer>, org.springframework.data.jpa.repository.JpaRepository<WeatherReport,Integer>, org.springframework.data.repository.ListCrudRepository<WeatherReport,Integer>, org.springframework.data.repository.ListPagingAndSortingRepository<WeatherReport,Integer>, org.springframework.data.repository.PagingAndSortingRepository<WeatherReport,Integer>, org.springframework.data.repository.query.QueryByExampleExecutor<WeatherReport>, org.springframework.data.repository.Repository<WeatherReport,Integer>

@Repository public interface WeatherReportRepository extends org.springframework.data.jpa.repository.JpaRepository<WeatherReport,Integer>
Spring Data JPA repository for WeatherReport entities.

Provides standard CRUD operations as well as custom query methods for retrieving and deleting weather reports associated with a specific activity.

Author:
SportTrack Team
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    deleteByActivity_Id(int activityId)
    Deletes the weather report associated with the specified activity.
    findByActivity_Id(int activityId)
    Finds the weather report associated with the specified activity.

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

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    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

    • findByActivity_Id

      Optional<WeatherReport> findByActivity_Id(int activityId)
      Finds the weather report associated with the specified activity.
      Parameters:
      activityId - the unique identifier of the activity
      Returns:
      an Optional containing the weather report if found, empty otherwise
    • deleteByActivity_Id

      void deleteByActivity_Id(int activityId)
      Deletes the weather report associated with the specified activity.
      Parameters:
      activityId - the unique identifier of the activity whose weather report should be deleted