Package de.dlr.proseo.model.dao
Interface OrbitRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Orbit,,Long> org.springframework.data.jpa.repository.JpaRepository<Orbit,,Long> org.springframework.data.repository.ListCrudRepository<Orbit,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<Orbit,,Long> org.springframework.data.repository.PagingAndSortingRepository<Orbit,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<Orbit>,org.springframework.data.repository.Repository<Orbit,Long>
public interface OrbitRepository
extends org.springframework.data.jpa.repository.JpaRepository<Orbit,Long>
Data Access Object for the Orbit class
- Author:
- Dr. Thomas Bassler
-
Method Summary
Modifier and TypeMethodDescriptionfindByMissionCodeAndSpacecraftCodeAndOrbitNumber(String missionCode, String spacecraftCode, Integer orbitNumber) Get the orbit with the given spacecraft and orbit numberfindByMissionCodeAndSpacecraftCodeAndOrbitNumberBetween(String missionCode, String spacecraftCode, Integer orbitNumberFrom, Integer orbitNumberTo) Get all orbits for the given spacecraft and orbit number rangefindByMissionCodeAndSpacecraftCodeAndStartTimeBetween(String missionCode, String spacecraftCode, Instant startTimeFrom, Instant startTimeTo) Get all orbits for a given spacecraft that start in the given time interval (inclusive)findByMissionCodeAndSpacecraftCodeAndTimeIntersect(String missionCode, String spacecraftCode, Instant startTime, Instant stopTime) Get all orbits for a given spacecraft that start and stop time intersects the given time interval (inclusive)findNextByMissionCodeAndSpacecraftCodeAndOrbitNumber(String missionCode, String spacecraftCode, Integer orbitNumber) Get the the next orbit with the given spacecraft and after orbit numberMethods 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
-
findByMissionCodeAndSpacecraftCodeAndOrbitNumber
@Query("select o from Orbit o where o.spacecraft.mission.code = ?1 and o.spacecraft.code = ?2 and o.orbitNumber = ?3") Orbit findByMissionCodeAndSpacecraftCodeAndOrbitNumber(String missionCode, String spacecraftCode, Integer orbitNumber) Get the orbit with the given spacecraft and orbit number- Parameters:
missionCode- the mission codespacecraftCode- the spacecraft codeorbitNumber- the orbit number- Returns:
- the unique orbit identified by the spacecraft code and the orbit number
-
findByMissionCodeAndSpacecraftCodeAndOrbitNumberBetween
@Query("select o from Orbit o where o.spacecraft.mission.code = ?1 and o.spacecraft.code = ?2 and o.orbitNumber between ?3 and ?4") List<Orbit> findByMissionCodeAndSpacecraftCodeAndOrbitNumberBetween(String missionCode, String spacecraftCode, Integer orbitNumberFrom, Integer orbitNumberTo) Get all orbits for the given spacecraft and orbit number range- Parameters:
missionCode- the mission codespacecraftCode- the spacecraft codeorbitNumberFrom- the first orbit numberorbitNumberTo- the last orbit number- Returns:
- a list of orbits satisfying the spacecraft code and the orbit number range
-
findByMissionCodeAndSpacecraftCodeAndStartTimeBetween
@Query("select o from Orbit o where o.spacecraft.mission.code = ?1 and o.spacecraft.code = ?2 and o.startTime between ?3 and ?4") List<Orbit> findByMissionCodeAndSpacecraftCodeAndStartTimeBetween(String missionCode, String spacecraftCode, Instant startTimeFrom, Instant startTimeTo) Get all orbits for a given spacecraft that start in the given time interval (inclusive)- Parameters:
missionCode- the mission codespacecraftCode- the spacecraft codestartTimeFrom- the earliest start timestartTimeTo- the latest start time- Returns:
- a list of orbits satisfying the selection criteria
-
findByMissionCodeAndSpacecraftCodeAndTimeIntersect
@Query("select o from Orbit o where o.spacecraft.mission.code = ?1 and o.spacecraft.code = ?2 and o.stopTime > ?3 and o.startTime < ?4") List<Orbit> findByMissionCodeAndSpacecraftCodeAndTimeIntersect(String missionCode, String spacecraftCode, Instant startTime, Instant stopTime) Get all orbits for a given spacecraft that start and stop time intersects the given time interval (inclusive)- Parameters:
missionCode- the mission codespacecraftCode- the spacecraft codestartTime- the start timestopTime- the stop time- Returns:
- a list of orbits satisfying the selection criteria
-
findNextByMissionCodeAndSpacecraftCodeAndOrbitNumber
@Query("select min(o.orbitNumber) from Orbit o where o.spacecraft.mission.code = ?1 and o.spacecraft.code = ?2 and o.orbitNumber > ?3") Integer findNextByMissionCodeAndSpacecraftCodeAndOrbitNumber(String missionCode, String spacecraftCode, Integer orbitNumber) Get the the next orbit with the given spacecraft and after orbit number- Parameters:
missionCode- the mission codespacecraftCode- the spacecraft codeorbitNumber- the orbit number- Returns:
- the unique orbit identified by the spacecraft code and the orbit number
-