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 Type
    Method
    Description
    findByMissionCodeAndSpacecraftCodeAndOrbitNumber(String missionCode, String spacecraftCode, Integer orbitNumber)
    Get the orbit with the given spacecraft and orbit number
    findByMissionCodeAndSpacecraftCodeAndOrbitNumberBetween(String missionCode, String spacecraftCode, Integer orbitNumberFrom, Integer orbitNumberTo)
    Get all orbits for the given spacecraft and orbit number range
    findByMissionCodeAndSpacecraftCodeAndStartTimeBetween(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)

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods 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 code
      spacecraftCode - the spacecraft code
      orbitNumber - 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 code
      spacecraftCode - the spacecraft code
      orbitNumberFrom - the first orbit number
      orbitNumberTo - 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 code
      spacecraftCode - the spacecraft code
      startTimeFrom - the earliest start time
      startTimeTo - 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 code
      spacecraftCode - the spacecraft code
      startTime - the start time
      stopTime - the stop time
      Returns:
      a list of orbits satisfying the selection criteria