KongaTreeNode parentNode = entityNode.getParent();
if (parentNode != null) {
Object parentObject = parentNode.getUserObject();
if (parentObject instanceof Schedule) {
Schedule schedule = (Schedule) parentObject;
return new ScheduledOperation(schedule, (Operation) entity);
}
}
return entityNode.getUserObject();
}