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
|
/**
|
12
|
* @author a.kohlbecker
|
13
|
* @since May 10, 2017
|
14
|
*
|
15
|
*/
|
16
|
public abstract class AbstractEntityEvent<T extends Enum> {
|
17
|
|
18
|
private Integer entityId = null;
|
19
|
|
20
|
protected T type;
|
21
|
|
22
|
public AbstractEntityEvent(T type, Integer entityId) {
|
23
|
this.entityId = entityId;
|
24
|
this.type = type;
|
25
|
if(type == null){
|
26
|
throw new NullPointerException();
|
27
|
}
|
28
|
}
|
29
|
|
30
|
/**
|
31
|
* @return the entityId
|
32
|
*/
|
33
|
public Integer getEntityId() {
|
34
|
return entityId;
|
35
|
}
|
36
|
|
37
|
public T getType() {
|
38
|
return type;
|
39
|
}
|
40
|
|
41
|
}
|