@Repository @Transactional(readOnly=true) public interface ScheduleRepository extends JpaRepository<Schedule,Schedule.PK>
Modifier and Type | Method and Description |
---|---|
long |
deleteByStationIDAndAirDateTimeGreaterThanEqual(int stationID,
long dateTime) |
List<String> |
getAllProgramIDs() |
Optional<Schedule> |
getSchedule(int stationID,
long dateTime) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlush
findAll
count, delete, deleteAll, deleteAll, deleteById, existsById, findById, save
count, exists, findAll, findOne
@Transactional long deleteByStationIDAndAirDateTimeGreaterThanEqual(int stationID, long dateTime)
@Query(value="SELECT schedule.programID FROM #{#entityName} schedule") List<String> getAllProgramIDs()
@Query(value="SELECT schedule FROM #{#entityName} schedule WHERE schedule.stationID = ?1 AND schedule.airDateTime <= ?2 AND ?2 < (schedule.airDateTime + schedule.duration)") Optional<Schedule> getSchedule(int stationID, long dateTime)
Copyright © 2015–2020 Allen D. Ball. All rights reserved.