Project

General

Profile

Download (1.38 KB) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2021 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.api.service.dto;
10

    
11
import java.util.UUID;
12

    
13
import eu.etaxonomy.cdm.model.common.EventBase;
14
import eu.etaxonomy.cdm.model.common.TimePeriod;
15
import eu.etaxonomy.cdm.ref.TypedEntityReference;
16

    
17
/**
18
 * @author a.kohlbecker
19
 * @since Mar 18, 2021
20
 */
21
public class EventDTO<T extends EventBase> extends TypedEntityReference<T>{
22

    
23
    private static final long serialVersionUID = -756496997548410660L;
24

    
25
    /**
26
     * @param type
27
     * @param uuid
28
     */
29
    public EventDTO(Class<T> type, UUID uuid) {
30
        super(type, uuid);
31
    }
32

    
33
    private TimePeriod timePeriod;
34
    protected String actor;
35

    
36
    protected EventDTO(T entity) {
37
        super(entity);
38
        timePeriod = entity.getTimeperiod();
39
        if(entity.getActor() != null) {
40
            actor = entity.getActor().getTitleCache();
41
        }
42
    }
43

    
44
    public TimePeriod getTimePeriod() {
45
        return timePeriod;
46
    }
47

    
48
    public void setTimePeriod(TimePeriod timePeriod) {
49
        this.timePeriod = timePeriod;
50
    }
51

    
52
    public String getActor() {
53
        return actor;
54
    }
55

    
56
    public void setActor(String actor) {
57
        this.actor = actor;
58
    }
59

    
60
}
(18-18/47)