589e1ad3
jcartign
First version
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
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);
}
|