From f980e5e53ab6dc13490a67c2866529800f1debe2 Mon Sep 17 00:00:00 2001 From: Jon Sundin Date: Tue, 30 Jan 2024 01:03:44 +0000 Subject: [PATCH] MessageService getAllMessages method --- src/main/java/Service/MessageService.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/Service/MessageService.java b/src/main/java/Service/MessageService.java index c802e20..1c67ea6 100644 --- a/src/main/java/Service/MessageService.java +++ b/src/main/java/Service/MessageService.java @@ -4,6 +4,8 @@ import DAO.MessageDAO; import DAO.AccountDAO; +import java.util.List; + public class MessageService { MessageDAO messageDAO; AccountDAO accountDAO; @@ -32,5 +34,9 @@ public boolean messageIsValid(int posted_by, String message_text) { public Message insertMessage(int posted_by, String message_text, long time_posted_epoch) { return messageDAO.insertMessage(posted_by, message_text, time_posted_epoch); } + + public List getAllMessages() { + return messageDAO.getAllMessages(); + } }