1
|
/**
|
2
|
* Copyright (C) 2017 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.vaadin.event;
|
10
|
|
11
|
import eu.etaxonomy.vaadin.mvp.AbstractView;
|
12
|
|
13
|
/**
|
14
|
* @author a.kohlbecker
|
15
|
* @since May 10, 2017
|
16
|
*
|
17
|
*/
|
18
|
public abstract class AbstractEntityEvent<T extends Enum> {
|
19
|
|
20
|
private Integer entityId = null;
|
21
|
|
22
|
protected T type;
|
23
|
|
24
|
private AbstractView sourceView = null;
|
25
|
|
26
|
public AbstractEntityEvent(T type, Integer entityId, AbstractView sourceView) {
|
27
|
this.entityId = entityId;
|
28
|
this.type = type;
|
29
|
this.sourceView = sourceView;
|
30
|
if(type == null){
|
31
|
throw new NullPointerException();
|
32
|
}
|
33
|
}
|
34
|
|
35
|
/**
|
36
|
* @return the entityId
|
37
|
*/
|
38
|
public Integer getEntityId() {
|
39
|
return entityId;
|
40
|
}
|
41
|
|
42
|
public T getType() {
|
43
|
return type;
|
44
|
}
|
45
|
|
46
|
/**
|
47
|
* @return the sourceView
|
48
|
*/
|
49
|
public AbstractView getSourceView() {
|
50
|
return sourceView;
|
51
|
}
|
52
|
|
53
|
}
|