Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[+] Added javadoc for DeleteEntryUseCase #74

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<code> entryID </code>) from the user and
* invoke the corresponding use case.
*
* @author Ellen, Scott
* @see DeleteEntryInputPort
*/

public class DeleteEntryController {

private final DeleteEntryInputPort useCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@
/**
* Clean Architecture Layer: Application Business Rules
*
* A concrete implementation of the <code>DeleteEntryUseCase</code>.
*
* @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) {
Expand Down