Class FindPatientByIdUseCase

java.lang.Object
com.mirna.hospitalmanagementapi.application.usecase.patient.FindPatientByIdUseCase

@Component public class FindPatientByIdUseCase extends Object
This class is used to execute the findById method
Version:
1.0
Author:
Mirna Gama
  • Constructor Details

    • FindPatientByIdUseCase

      public FindPatientByIdUseCase()
  • Method Details

    • execute

      public Patient execute(Long id)
      Executes the findById method from Patient repository
      Parameters:
      id - A long representing the patient's unique identifier
      Returns:
      The corresponding patient if successful, or null if it is non-existent