entity = app.relationshipQuery().uuid(uuid).getFirst();
}
if (entity == null) {
throw new NotFoundException();
}
if (entity instanceof AbstractNode && !securityContext.isReadable((AbstractNode)entity, true, false)) {
throw new NotAllowedException();
}