Revision c0abdb1d
Added by Patrick Plitzner over 5 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/descriptiveDataSet/matrix/CharacterMatrixPart.java | ||
---|---|---|
156 | 156 |
@Persist |
157 | 157 |
@Override |
158 | 158 |
public void save(IProgressMonitor monitor) { |
159 |
//save descriptions |
|
159 | 160 |
matrix.getDescriptions().stream() |
160 | 161 |
.filter(o->o instanceof RowWrapperDTO) |
161 | 162 |
.forEach(wrapper->save((RowWrapperDTO)wrapper)); |
163 |
//save data set |
|
162 | 164 |
CdmStore.getService(IDescriptiveDataSetService.class).merge(descriptiveDataSet, true); |
163 |
updateResults.forEach(result-> |
|
164 |
CdmStore.getService(result.getCdmEntity()).merge(result.getCdmEntity(), true)); |
|
165 |
|
|
166 |
//save update results (taxon with aggregated description) |
|
167 |
if(updateResults!=null){ |
|
168 |
updateResults.forEach(result-> |
|
169 |
CdmStore.getService(result.getCdmEntity()).merge(result.getCdmEntity(), true)); |
|
170 |
} |
|
171 |
|
|
165 | 172 |
conversation.commit(); |
166 | 173 |
updateResults = null; |
167 | 174 |
dirty.setDirty(false); |
Also available in: Unified diff
Fix potential NPE when saving