Interface SpacecraftRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Spacecraft,Long>, org.springframework.data.jpa.repository.JpaRepository<Spacecraft,Long>, org.springframework.data.repository.ListCrudRepository<Spacecraft,Long>, org.springframework.data.repository.ListPagingAndSortingRepository<Spacecraft,Long>, org.springframework.data.repository.PagingAndSortingRepository<Spacecraft,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Spacecraft>, org.springframework.data.repository.Repository<Spacecraft,Long>

public interface SpacecraftRepository extends org.springframework.data.jpa.repository.JpaRepository<Spacecraft,Long>
Data Access Object for the Spacecraft class
Author:
Dr. Thomas Bassler
  • Method Summary

    Modifier and Type
    Method
    Description
    findByMissionAndCode(String missionCode, String spacecraftCode)
    Get the spacecraft with the given mission and code

    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

    • findByMissionAndCode

      @Query("select sc from Spacecraft sc where sc.mission.code = ?1 and sc.code = ?2") Spacecraft findByMissionAndCode(String missionCode, String spacecraftCode)
      Get the spacecraft with the given mission and code
      Parameters:
      missionCode - the mission code
      spacecraftCode - the spacecraft code
      Returns:
      the unique spacecraft identified by the code