Skip to content

Commit 79e16ae

Browse files
chore: add getRooms to room repository
1 parent d28f45a commit 79e16ae

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Diff for: src/main/kotlin/usecase/repository/RoomRepository.kt

+9-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ package usecase.repository
1010

1111
import entity.zone.Room
1212
import entity.zone.RoomID
13+
import java.util.Date
1314

1415
/**
1516
* Interface that models the repository to manage Rooms.
@@ -28,8 +29,14 @@ interface RoomRepository {
2829
fun deleteRoom(roomId: RoomID): Boolean
2930

3031
/**
31-
* Find a room by its [roomId].
32+
* Find a room by its [roomId] and get its data in a specific [dateTime].
3233
* @return the room if present, null otherwise.
3334
*/
34-
fun findBy(roomId: RoomID): Room?
35+
fun findBy(roomId: RoomID, dateTime: Date): Room?
36+
37+
/**
38+
* Get all the rooms.
39+
* @return the set of rooms.
40+
*/
41+
fun getRooms(): Set<Room>
3542
}

0 commit comments

Comments
 (0)