Interface WaveformRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Waveform,,Long> DetachableJpaRepository<Waveform,,Long> org.springframework.data.jpa.repository.JpaRepository<Waveform,,Long> org.springframework.data.repository.ListCrudRepository<Waveform,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<Waveform,,Long> org.springframework.data.repository.PagingAndSortingRepository<Waveform,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Waveform>,org.springframework.data.repository.Repository<Waveform,Long>
-
Method Summary
Modifier and TypeMethodDescriptionfindAllActiveStacksByEventIdAndStationNames(String eventId, List<String> stationNames) findAllActiveStacksByStationNames(List<String> stationNames) findAllIdsByEventId(String eventId) findAllIdsByStationName(String stationName) findAllIdsByStationNameAndEventId(String stationName, String eventId) findAllMetadataByIds(List<Long> ids) findByUniqueFields(String eventId, String networkName, String stationName, Double lowFrequency, Double highFrequency) findEventById(String eventId, org.springframework.data.domain.Pageable pageable) findIdsNotIn(List<Long> ids) findOneByAllFields(Date beginTime, Date endTime, Event event, Stream stream, String segmentType, String segmentUnits, Double lowFrequency, Double highFrequency) getMetadataInsideBounds(boolean active, Double minX, Double minY, Double maxX, Double maxY) getWaveformMetadataByActive(boolean active) intsetActiveByEventId(String eventId, boolean active) intsetActiveByStationName(String stationName, boolean active) intsetActiveByStationNameAndEventId(String stationName, String eventId, boolean active) intsetActiveIn(boolean active, List<Long> waveformIds) intsetActiveNotIn(boolean active, List<Long> waveformIds) voidsetAllActive(boolean active) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface gov.llnl.gnem.apps.coda.common.repository.DetachableJpaRepository
findOneDetachedMethods 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
-
findByUniqueFields
@Query("select w from Waveform w where w.event.eventId = :eventId and w.stream.station.networkName = :networkName and w.stream.station.stationName = :stationName and w.lowFrequency = :lowFrequency and w.highFrequency = :highFrequency order by w.id desc") Waveform findByUniqueFields(@Param("eventId") String eventId, @Param("networkName") String networkName, @Param("stationName") String stationName, @Param("lowFrequency") Double lowFrequency, @Param("highFrequency") Double highFrequency) -
findOneByAllFields
@Query("select w from Waveform w where w.beginTime = :beginTime and w.endTime = :endTime and w.event = :event and w.stream = :stream and w.segmentType = :segmentType and w.segmentUnits = :segmentUnits and w.lowFrequency = :lowFrequency and w.highFrequency = :highFrequency order by w.id desc") Waveform findOneByAllFields(@Param("beginTime") Date beginTime, @Param("endTime") Date endTime, @Param("event") Event event, @Param("stream") Stream stream, @Param("segmentType") String segmentType, @Param("segmentUnits") String segmentUnits, @Param("lowFrequency") Double lowFrequency, @Param("highFrequency") Double highFrequency) -
getWaveformMetadata
-
getWaveformMetadataByActive
@Query("select new Waveform(w.id, w.version, w.event, w.stream, w.beginTime, w.endTime, w.maxVelTime, w.codaStartTime, w.userStartTime, w.segmentType, w.segmentUnits, w.lowFrequency, w.highFrequency, w.sampleRate, w.active) from Waveform w where w.active = :active order by w.id desc") List<Waveform> getWaveformMetadataByActive(@Param("active") boolean active) -
findAllMetadataByIds
@Query("select new Waveform(w.id, w.version, w.event, w.stream, w.beginTime, w.endTime, w.maxVelTime, w.codaStartTime, w.userStartTime, w.segmentType, w.segmentUnits, w.lowFrequency, w.highFrequency, w.sampleRate, w.active) from Waveform w where w.id in :ids order by w.id desc") List<Waveform> findAllMetadataByIds(@Param("ids") List<Long> ids) -
findWaveformMetadataById
@Query("select new Waveform(w.id, w.version, w.event, w.stream, w.beginTime, w.endTime, w.maxVelTime, w.codaStartTime, w.userStartTime, w.segmentType, w.segmentUnits, w.lowFrequency, w.highFrequency, w.sampleRate, w.active) from Waveform w where w.id = :id order by w.id desc") Waveform findWaveformMetadataById(@Param("id") Long id) -
findPicksByWaveformId
@Query("select p from WaveformPick p where p.waveform.id = :id") List<WaveformPick> findPicksByWaveformId(@Param("id") Long id) -
findEventById
-
setActiveByEventId
@Modifying(clearAutomatically=true, flushAutomatically=true) @Query("update Waveform w SET w.active = :active where w.event.eventId = :eventId") int setActiveByEventId(@Param("eventId") String eventId, @Param("active") boolean active) -
setActiveByStationName
@Modifying(clearAutomatically=true, flushAutomatically=true) @Query("update Waveform w SET w.active = :active where w.stream.station.stationName = :stationName") int setActiveByStationName(@Param("stationName") String stationName, @Param("active") boolean active) -
setActiveByStationNameAndEventId
@Modifying(clearAutomatically=true, flushAutomatically=true) @Query("update Waveform w SET w.active = :active where w.stream.station.stationName = :stationName and w.event.eventId = :eventId") int setActiveByStationNameAndEventId(@Param("stationName") String stationName, @Param("eventId") String eventId, @Param("active") boolean active) -
setAllActive
@Modifying(clearAutomatically=true, flushAutomatically=true) @Query("update Waveform w SET w.active = :active") void setAllActive(boolean active) -
setActiveIn
-
setActiveNotIn
-
getMetadataInsideBounds
@Query("select new Waveform(w.id, w.version, w.event, w.stream, w.beginTime, w.endTime, w.maxVelTime, w.codaStartTime, w.userStartTime, w.segmentType, w.segmentUnits, w.lowFrequency, w.highFrequency, w.sampleRate, w.active) from Waveform w where w.active = :active and(w.stream.station.latitude between :minX and :maxX and w.stream.station.longitude between :minY and :maxY) or (w.event.latitude between :minX and :maxX and w.event.longitude between :minY and :maxY)") List<Waveform> getMetadataInsideBounds(@Param("active") boolean active, @Param("minX") Double minX, @Param("minY") Double minY, @Param("maxX") Double maxX, @Param("maxY") Double maxY) -
findAllIdsByEventId
-
findAllIdsByStationName
-
findAllIdsByStationNameAndEventId
-
findAllActiveStacksByStationNames
-
findAllActiveStacksByEventIdAndStationNames
@Query("select w from Waveform w where w.active = true and w.event.eventId = :eventId and w.stream.channelName = \'STACK\' and w.stream.station.stationName in :stationNames") List<Waveform> findAllActiveStacksByEventIdAndStationNames(@Param("eventId") String eventId, @Param("stationNames") List<String> stationNames) -
findAllInactiveIds
-
findIdsNotIn
-
getUniqueEventIds
-