@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<Schedule> |
findAiringAt(long dateTime) |
Set<String> |
findAllProgramIDs() |
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 DISTINCT schedule.programID FROM #{#entityName} schedule") Set<String> findAllProgramIDs()
@Query(value="SELECT schedule FROM #{#entityName} schedule WHERE ?1 BETWEEN schedule.airDateTime AND (schedule.airDateTime + schedule.duration)") List<Schedule> findAiringAt(long dateTime)
Copyright © 2015–2021. All rights reserved.