Made elastic dmp mapping more safe
This commit is contained in:
parent
2ba3f11687
commit
91fc1bc5b1
|
@ -242,7 +242,9 @@ public class Dmp implements ElasticEntity<Dmp> {
|
|||
this.id = UUID.fromString((String) fields.get(MapKey.ID.getName()));
|
||||
this.label = (String) fields.get(MapKey.LABEL.getName());
|
||||
this.description = (String) fields.get(MapKey.DESCRIPTION.getName());
|
||||
this.groupId = UUID.fromString((String) fields.get(MapKey.GROUPID.getName()));
|
||||
if (fields.get(MapKey.GROUPID.getName()) != null) {
|
||||
this.groupId = UUID.fromString((String) fields.get(MapKey.GROUPID.getName()));
|
||||
}
|
||||
this.status = Short.valueOf(fields.get(MapKey.STATUS.getName()).toString());
|
||||
if (fields.get(MapKey.TEMPLATES.getName()) != null) {
|
||||
this.templates = ((List<HashMap<String, Object>>) fields.get(MapKey.TEMPLATES.getName())).stream().map(hashMap -> new DatasetTempalate().fromElasticEntity(hashMap)).collect(Collectors.toList());
|
||||
|
|
Loading…
Reference in New Issue