public BusinessServiceEntity toEntity() {
BusinessServiceEntity entity = new BusinessServiceEntity();
entity.setName(name);
entity.setId(id);
entity.setAttributes(attributes);
if (reduceFunction != null) {
entity.setReductionFunction(reduceFunction);
}
ipServices.forEach(e -> entity.addIpServiceEdge(e.value, e.mapFunction, e.weight, e.friendlyName));
children.forEach(e -> entity.addChildServiceEdge(e.value, e.mapFunction, e.weight));
reductionKeys.forEach(e -> entity.addReductionKeyEdge(e.value, e.mapFunction, e.weight, e.friendlyName));
return entity;
}