use of com.baidu.hugegraph.entity.load.FileMapping in project incubator-hugegraph-toolchain by apache.
the class FileMappingController method addVertexMapping.
@PostMapping("{id}/vertex-mappings")
public FileMapping addVertexMapping(@PathVariable("connId") int connId, @PathVariable("id") int id, @RequestBody VertexMapping newEntity) {
FileMapping mapping = this.service.get(id);
if (mapping == null) {
throw new ExternalException("load.file-mapping.not-exist.id", id);
}
this.checkVertexMappingValid(connId, newEntity, mapping);
newEntity.setId(HubbleUtil.generateSimpleId());
mapping.getVertexMappings().add(newEntity);
this.service.update(mapping);
return mapping;
}
Aggregations