diff --git a/src/main/java/billgates/use_cases/delete_entry/DeleteEntryController.java b/src/main/java/billgates/use_cases/delete_entry/DeleteEntryController.java index c527bb5..b848c4e 100644 --- a/src/main/java/billgates/use_cases/delete_entry/DeleteEntryController.java +++ b/src/main/java/billgates/use_cases/delete_entry/DeleteEntryController.java @@ -2,9 +2,14 @@ /** * Clean Architecture Layer: Interface Adapters + * This class serves as the controller of the Delete Entry Use Case. + * It is only responsible for accepting the input ( entryID ) from the user and + * invoke the corresponding use case. * * @author Ellen, Scott + * @see DeleteEntryInputPort */ + public class DeleteEntryController { private final DeleteEntryInputPort useCase; diff --git a/src/main/java/billgates/use_cases/delete_entry/DeleteEntryInputPort.java b/src/main/java/billgates/use_cases/delete_entry/DeleteEntryInputPort.java index ffb8a3a..f9869bd 100644 --- a/src/main/java/billgates/use_cases/delete_entry/DeleteEntryInputPort.java +++ b/src/main/java/billgates/use_cases/delete_entry/DeleteEntryInputPort.java @@ -2,9 +2,17 @@ /** * Clean Architecture Layer: Application Business Rules + * An input port for the Delete Entry use case. * * @author Ellen, Scott + * + * @see DeleteEntryUseCase */ public interface DeleteEntryInputPort { + /** + * This method will delete the entry with corresponding entryID in the database. + * + * @param entryId the entryId that need to be deleted. + */ void deleteEntry(int entryId); } diff --git a/src/main/java/billgates/use_cases/delete_entry/DeleteEntryUseCase.java b/src/main/java/billgates/use_cases/delete_entry/DeleteEntryUseCase.java index c27fd8f..a25c787 100644 --- a/src/main/java/billgates/use_cases/delete_entry/DeleteEntryUseCase.java +++ b/src/main/java/billgates/use_cases/delete_entry/DeleteEntryUseCase.java @@ -6,10 +6,17 @@ /** * Clean Architecture Layer: Application Business Rules * + * A concrete implementation of the DeleteEntryUseCase. + * * @author Ellen, Scott + * + * @see DeleteEntryInputPort */ -public class DeleteEntryUseCase implements DeleteEntryInputPort { +public class DeleteEntryUseCase implements DeleteEntryInputPort { + /** + * The database gateway for input/output with the database. + */ private final DatabaseGateway gateway; public DeleteEntryUseCase(DatabaseGateway gateway) {