mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-24 14:33:41 +02:00
This finally makes the licensing under AGPL-3.0-or-later explicit after I got the okay from the kickstart source owners. This also checks the REUSE compliance in a pre commit hook, and therefore also in CI.
27 lines
867 B
Java
27 lines
867 B
Java
// 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<CustomOrder, Order.OrderIdentifier>{
|
|
|
|
@Query("""
|
|
select order from #{#entityName} order
|
|
where
|
|
not order.start > ?2 and
|
|
not order.finish < ?1
|
|
""")
|
|
Streamable<CustomOrder> findOrdersByInterval(LocalDateTime start, LocalDateTime finish);
|
|
|
|
}
|