CommentService.java
823 Bytes
package fr.plil.sio.examen.services;
import fr.plil.sio.examen.api.Animal;
import fr.plil.sio.examen.api.Comment;
import fr.plil.sio.examen.api.Owner;
import java.util.List;
public interface CommentService {
/**
* Add a new comment (message) made by a reporter to an animal
*/
Comment add(Owner reporter, Animal animal, String message);
/**
* Delete the comment
*/
void delete(Comment comment);
/**
* List all messages about an animal
*/
List<Comment> findByAnimal(Animal animal);
/**
* List all messages reported by one owner
*/
List<Comment> findByReporter(Owner reporter);
/**
* List all messages about all animals of one owner
*/
List<Comment> findByOwner(Owner owner);
}