Revision c69c2dcd
Added by Cherian Mathew over 8 years ago
eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/cdm/api/application/CdmChangeEvent.java | ||
---|---|---|
30 | 30 |
private final Action action; |
31 | 31 |
private final Set<CdmBase> changedObjects; |
32 | 32 |
private final Class sourceType; |
33 |
private Class entityType; |
|
33 | 34 |
private Object source; |
34 | 35 |
|
35 | 36 |
public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Class sourceType) { |
... | ... | |
45 | 46 |
this.sourceType = sourceType; |
46 | 47 |
} |
47 | 48 |
|
49 |
public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Class sourceType, Class entityType) { |
|
50 |
this(action, changedObjects, sourceType); |
|
51 |
this.entityType = entityType; |
|
52 |
} |
|
53 |
|
|
48 | 54 |
public CdmChangeEvent(Action action, Set<CdmBase> changedObjects, Object source) { |
49 | 55 |
this(action, changedObjects, source.getClass()); |
50 | 56 |
this.source = source; |
... | ... | |
79 | 85 |
return source; |
80 | 86 |
} |
81 | 87 |
|
88 |
public Class getEntityType() { |
|
89 |
return entityType; |
|
90 |
} |
|
91 |
|
|
82 | 92 |
public boolean hasChanges() { |
83 | 93 |
return changedObjects != null && !changedObjects.isEmpty(); |
84 | 94 |
} |
Also available in: Unified diff
Add entity type to CdmChangeEvent and fixes #5139