// SPDX-License-Identifier: AGPL-3.0-or-later // SPDX-FileCopyrightText: 2023 swt23w23 package catering.order; import catering.catalog.Rentable; import org.salespointframework.inventory.UniqueInventory; import org.salespointframework.inventory.UniqueInventoryItem; import org.salespointframework.order.Order; import org.salespointframework.quantity.Quantity; import org.springframework.data.jpa.repository.Query; import org.springframework.data.util.Streamable; import org.springframework.data.repository.Repository; import java.time.LocalDateTime; public interface CustomOrderRepository extends Repository{ @Query(""" select order from #{#entityName} order where not order.start > ?2 and not order.finish < ?1 """) Streamable findOrdersByInterval(LocalDateTime start, LocalDateTime finish); }