Interface MonExtServiceStateOperationDayRepository

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

public interface MonExtServiceStateOperationDayRepository extends org.springframework.data.jpa.repository.JpaRepository<MonExtServiceStateOperationDay,Long>
  • Method Summary

    Modifier and Type
    Method
    Description
    findByDateTimeBetween(Instant timeFrom, Instant timeTo, long monExtServiceId)
    Get a list of entries
    Get a latest datetime

    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 MonExtServiceStateOperationDay d") Instant findLastDatetime()
      Get a latest datetime
      Returns:
      the latest datetime
    • findByDateTimeBetween

      @Query("select p from MonExtServiceStateOperationDay p where p.datetime >= ?1 and p.datetime < ?2 and p.monExtServiceId = ?3") List<MonExtServiceStateOperationDay> findByDateTimeBetween(Instant timeFrom, Instant timeTo, long monExtServiceId)
      Get a list of entries
      Parameters:
      timeFrom - earliest time
      timeTo - latest time
      monExtServiceId - service id
      Returns:
      a list of services satisfying the search criteria