protected BE getParent(Transaction<BE> tx) { return ElementTypeVisitor.accept(AbstractElement.segmentTypeFromType(context.entityClass), new ElementTypeVisitor.Simple<BE, Void>() { @SuppressWarnings("unchecked") @Override protected BE defaultAction(SegmentType elementType, Void parameter) { BE res = tx.querySingle(context.sourcePath); if (res == null) { throw new EntityNotFoundException(context.previous.entityClass, Query.filters(context.sourcePath)); } return res; } @Override public BE visitTenant(Void parameter) { return null; } }, null); }
@SuppressWarnings({"unchecked", "rawtypes"}) private Mutator<BE, E, B, U, String> createMutator(Transaction<BE> tx) { return (Mutator<BE, E, B, U, String>) ElementTypeVisitor.accept( Inventory.types().byElement(context.entityClass).getSegmentType(), new ElementTypeVisitor<Mutator<BE, ?, ?, ?, String>, Void>() {
acs = s.collect(Collectors.toList()); acs.forEach(b -> ElementTypeVisitor.accept(Blueprint.getSegmentTypeOf(b), visitor, empty.modified()));
acs = s.collect(Collectors.toList()); acs.forEach(b -> ElementTypeVisitor.accept(Blueprint.getSegmentTypeOf(b), visitor, empty.modified()));
return ElementTypeVisitor.accept(childSegment, new ElementTypeVisitor<Stream<FullNode>, Void>() {