1718192021222324
public class MessageService implements RepositoryService<Message> { @Override public Message store(Message message) { MessageDAO repository = new MessageDAO(); return repository.save(message); }
242526272829303132
} @Override public void remove(Message message) { MessageDAO repository = new MessageDAO(); repository.delete(message); }
3233343536373839
} @Override public Collection<Message> getAll() { MessageDAO repository = new MessageDAO(); return repository.getAll(); }
3839404142434445
return repository.getAll(); } @Override public Message getById(Serializable id) { MessageDAO repository = new MessageDAO(); return repository.get(id); }