Separate interface for DefinedTermBase and enumerations #3618
[cdmlib.git] / cdmlib-model / src / main / java / eu / etaxonomy / cdm / model / common / ISimpleTerm.java
1 /**
2 *
3 */
4 package eu.etaxonomy.cdm.model.common;
5
6 import java.util.Set;
7 import java.util.UUID;
8
9 import javax.persistence.Transient;
10
11 /**
12 * The common interface which is implemented by {@link DefinedTermBase defined terms} and enumerations
13 * replacing fully {@link DefinedTermBase defined terms}.
14 *
15 * @author a.mueller
16 * @created 14-Jul-1913
17 */
18 public interface ISimpleTerm<T extends ISimpleTerm> {
19
20 @Transient
21 public UUID getUuid();
22
23 public T getByUuid(UUID uuid);
24
25
26 /**
27 * Returns the defined term this term is a kind of.
28 * Therefore the returned term is a generalization of <code>this</code> term
29 */
30 public T getKindOf();
31
32
33 /**
34 * Returns all defined terms this term is a generalization for.
35 * Therefore the returned terms are kind of <code>this</code> term
36 */
37 public Set<T> getGeneralizationOf();
38
39 }