Interface ReservationRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ReservationEntity,Long>, DomainIdRepository<ReservationEntity,Long>, org.springframework.data.jpa.repository.JpaRepository<ReservationEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<ReservationEntity>, org.springframework.data.repository.PagingAndSortingRepository<ReservationEntity,Long>, org.springframework.data.repository.query.QueryByExampleExecutor<ReservationEntity>, org.springframework.data.repository.Repository<ReservationEntity,Long>

@Repository public interface ReservationRepository extends DomainIdRepository<ReservationEntity,Long>
  • Method Details

    • findAllByReservationObjectIdAndDomainId

      List<ReservationEntity> findAllByReservationObjectIdAndDomainId(Long reservationObjectId, Integer domainId)
    • findAllByReservationObjectIdAndDomainIdAndDateFromLessThanEqualAndDateToGreaterThanEqualAndAcceptedTrue

      List<ReservationEntity> findAllByReservationObjectIdAndDomainIdAndDateFromLessThanEqualAndDateToGreaterThanEqualAndAcceptedTrue(Long reservationObjectId, Integer domainId, Date dateFrom, Date dateTo)
    • findByDateAndType

      @Query("SELECT re FROM ReservationEntity re JOIN ReservationObjectEntity roe ON re.reservationObjectId = roe.id WHERE re.dateFrom <= :dateFrom AND re.dateTo >= :dateTo AND roe.reservationForAllDay = :reservationForAllDay AND re.accepted = true AND re.domainId = :domainId") List<ReservationEntity> findByDateAndType(@Param("dateFrom") Date dateFrom, @Param("dateTo") Date dateTo, @Param("reservationForAllDay") Boolean reservationForAllDay, @Param("domainId") Integer domainId)
    • findAcceptedByIdAndDomainId

      @Query("SELECT re.accepted FROM ReservationEntity re WHERE re.id = :id AND re.domainId = :domainId") Boolean findAcceptedByIdAndDomainId(@Param("id") Long id, @Param("domainId") Integer domainId)