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 TypeMethodDescriptionvoiddeleteByActivity_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, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByActivity_Id
Finds the weather report associated with the specified activity.- Parameters:
activityId- the unique identifier of the activity- Returns:
- an
Optionalcontaining 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
-