1
2
3
4
5
6
7 package ch.colabproject.colab.api.model;
8
9 import ch.colabproject.colab.api.exceptions.ColabMergeException;
10 import ch.colabproject.colab.generator.model.interfaces.WithId;
11 import ch.colabproject.colab.generator.model.interfaces.WithJsonDiscriminator;
12 import ch.colabproject.colab.generator.model.tools.PolymorphicDeserializer;
13 import javax.json.bind.annotation.JsonbTypeDeserializer;
14
15
16
17
18
19
20 @JsonbTypeDeserializer(PolymorphicDeserializer.class)
21 public interface ColabEntity
22 extends WithId, WithTrackingData, WithDeletionStatus, WithPermission, WithJsonDiscriminator {
23
24
25
26
27
28
29
30
31
32
33 void mergeToUpdate(ColabEntity other) throws ColabMergeException;
34
35
36
37
38
39
40
41
42
43
44 default void mergeToDuplicate(ColabEntity other) throws ColabMergeException {
45 mergeToUpdate(other);
46 }
47 }