File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/main/java/org/soujava/demos/mongodb/document Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ package org .soujava .demos .mongodb .document ;
2+
3+ import jakarta .data .repository .Query ;
4+ import jakarta .data .repository .Repository ;
5+
6+ import java .util .List ;
7+
8+ @ Repository
9+ public interface RoomRepository {
10+
11+ @ Query ("WHERE type = 'VIP_SUITE' AND status = 'AVAILABLE' AND underMaintenance = false" )
12+ List <Room > findVipRoomsReadyForGuests ();
13+
14+ @ Query (" WHERE type <> 'VIP_SUITE' AND status = 'AVAILABLE' AND cleanStatus = 'CLEAN'" )
15+ List <Room > findAvailableStandardRooms ();
16+
17+ @ Query ("WHERE cleanStatus <> 'CLEAN' AND status != 'OUT_OF_SERVICE'" )
18+ List <Room > findRoomsNeedingCleaning ();
19+
20+ @ Query ("WHERE smokingAllowed = true AND status = 'AVAILABLE'" )
21+ List <Room > findAvailableSmokingRooms ();
22+ }
You can’t perform that action at this time.
0 commit comments