Class AvailabilityQueryFunction
java.lang.Object
ch.tocco.nice2.optional.reservation.impl.queryfunction.AvailabilityQueryFunction
- All Implemented Interfaces:
QueryFunction
This query function makes it possible to search for rooms/appliances which are available within a datetime range.
This functionally is used by the advanced search of the availability field. The first argument is the from datetime
and the second argument is the till datetime.
If you want only rooms which are available all day at the 01.08.2025, you can use
`find room where AVAILABILITY(datetime:"2025-08-01 00:00", datetime:"2025-08-02 00:00")`
Replaces
FindFreeQueryParameterHandler
used by the legacy admin.-
Constructor Summary
ConstructorsConstructorDescriptionAvailabilityQueryFunction
(TypeManager typeManager, ReservationConflictManager reservationConflictManager) -
Method Summary
Modifier and TypeMethodDescriptiongetName()
The unique function name.@Nullable Node
postCompile
(Cursor cursor, FuncallNode functionRoot, EntityModel entityModel) Applies this function to the given (sub)tree.
-
Constructor Details
-
AvailabilityQueryFunction
public AvailabilityQueryFunction(TypeManager typeManager, @Lazy ReservationConflictManager reservationConflictManager)
-
-
Method Details
-
getName
Description copied from interface:QueryFunction
The unique function name.- Specified by:
getName
in interfaceQueryFunction
-
postCompile
@Nullable public @Nullable Node postCompile(Cursor cursor, FuncallNode functionRoot, EntityModel entityModel) Description copied from interface:QueryFunction
Applies this function to the given (sub)tree.- Specified by:
postCompile
in interfaceQueryFunction
-