Interface MonProductProductionHourRepository

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

public interface MonProductProductionHourRepository extends org.springframework.data.jpa.repository.JpaRepository<MonProductProductionHour,Long>
Data Access Object for the MonProductProductionHour class
Author:
Ernst Melchinger
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a list of products
    findByProductionTypeAndDatetime(long missionId, String mpt, Instant datetime)
    Get a list of products
    Get a list of products

    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

    • findLastDatetime

      @Query("select max(d.datetime) from MonProductProductionHour d") Instant findLastDatetime()
      Get a list of products
      Returns:
      a list of products satisfying the search criteria
    • findByProductionTypeAndDatetime

      @Query("select p from MonProductProductionHour p where p.mission.id = ?1 and p.productionType = ?2 and p.datetime = ?3") List<MonProductProductionHour> findByProductionTypeAndDatetime(long missionId, String mpt, Instant datetime)
      Get a list of products
      Parameters:
      missionId - the mission id
      mpt - the production type
      datetime - the datetime
      Returns:
      a list of products satisfying the search criteria
    • findByMissionCodeAndProductionTypeAndDateTimeBetween

      @Query("select p from MonProductProductionHour p where p.mission.id = ?1 and p.productionType = ?2 and p.datetime >= ?3 and p.datetime < ?4") List<MonProductProductionHour> findByMissionCodeAndProductionTypeAndDateTimeBetween(long missionId, String mpt, Instant timeFrom, Instant timeTo)
      Get a list of products
      Parameters:
      missionId - the mission id
      mpt - the production type
      timeFrom - the earliest datetime
      timeTo - the latest datetime
      Returns:
      a list of products satisfying the search criteria