Skip to content

Commit

Permalink
fix: correct type of surgical process
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-acampora committed Mar 28, 2023
1 parent f1980c1 commit 58075b0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,32 @@
package application.controller.manager

import entity.process.ProcessData
import entity.process.SurgicalProcess

/**
* This interface models the manager of the database for processes.
*/
interface ProcessDatabaseManager {

/**
* Create a [Process].
* Create a [SurgicalProcess].
* @return null if the process already exist, the process otherwise.
*/
fun createProcess(
process: Process
): Process?
fun createSurgicalProcess(
process: SurgicalProcess
): SurgicalProcess?

/**
* Get a [Process] by its id.
* Get a [SurgicalProcess] by its id.
* @return the process if it exists, null otherwise.
*/
fun getProcessById(
fun getSurgicalProcessById(
processId: ProcessData.ProcessId
): Process?
): SurgicalProcess?

/**
* Get all current [Process].
* Get all current [SurgicalProcess].
* @return a set of all processes.
*/
fun getCurrentProcesses(): Set<Process>
fun getCurrentSurgicalProcesses(): Set<SurgicalProcess>
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,31 @@
package usecase.repository

import entity.process.ProcessData
import entity.process.SurgicalProcess

/**
* Interface that models the repository to manage the processes.
*/
interface ProcessRepository {
interface SurgicalProcessRepository {
/**
* Create a [Process].
* Create a [SurgicalProcess].
* @return null if the process already exist, the process otherwise.
*/
fun createProcess(
process: Process
): Process?
fun createSurgicalProcess(
process: SurgicalProcess
): SurgicalProcess?

/**
* Get a [Process] by its id.
* Get a [SurgicalProcess] by its id.
* @return the process if it exists, null otherwise.
*/
fun getProcessById(
fun getSurgicalProcessById(
processId: ProcessData.ProcessId
): Process?
): SurgicalProcess?

/**
* Get all current [Process].
* Get all current [SurgicalProcess].
* @return a set of all processes.
*/
fun getCurrentProcesses(): Set<Process>
fun getCurrentSurgicalProcesses(): Set<SurgicalProcess>
}

0 comments on commit 58075b0

Please sign in to comment.