File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
src/main/java/org/soujava/demos/mongodb/document Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1010@ Repository
1111public interface RoomRepository {
1212
13+ @ Query ("FROM Room" )
14+ List <Room > findAll ();
1315 @ Query ("WHERE type = 'VIP_SUITE' AND status = 'AVAILABLE' AND underMaintenance = false" )
1416 List <Room > findVipRoomsReadyForGuests ();
1517
@@ -26,7 +28,7 @@ public interface RoomRepository {
2628 void save (List <Room > rooms );
2729
2830 @ Save
29- Room newRoom (Room room );
31+ Room save (Room room );
3032 void deleteBy ();
3133
3234 @ Query ("WHERE type = :type" )
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ public RoomService(RoomRepository repository) {
2020 this .repository = null ;
2121 }
2222
23- public void newRoom (Room room ) {
24- repository .newRoom (room );
23+ public void save (Room room ) {
24+ repository .save (room );
2525 }
2626
2727
You can’t perform that action at this time.
0 commit comments