@Override public Collection<PropertyExecutor> undefine(Var var) throws GraqlQueryException { PropertyExecutor.Method method = executor -> { Type type = executor.get(var).asType(); if (!type.isDeleted()) { type.isAbstract(false); } }; return ImmutableSet.of(PropertyExecutor.builder(method).requires(var).build()); }
@Override public Collection<PropertyExecutor> undefine(Var var) throws GraqlQueryException { PropertyExecutor.Method method = executor -> { Type type = executor.get(var).asType(); Role role = executor.get(this.role().var()).asRole(); if (!type.isDeleted() && !role.isDeleted()) { type.unplay(role); } }; return ImmutableSet.of(PropertyExecutor.builder(method).requires(var, role().var()).build()); }
@Override public Collection<PropertyExecutor> undefine(Var var) throws GraqlQueryException { PropertyExecutor.Method method = executor -> { Type type = executor.get(var).asType(); AttributeType<?> attributeType = executor.get(resourceType().var()).asAttributeType(); if (!type.isDeleted() && !attributeType.isDeleted()) { if (required()) { type.unkey(attributeType); } else { type.unhas(attributeType); } } }; return ImmutableSet.of(PropertyExecutor.builder(method).requires(var, resourceType().var()).build()); }