Class ModelRelationshipQueries.OwnedRelationshipGraph

java.lang.Object
io.fluxzero.common.modeling.ModelRelationshipQueries.OwnedRelationshipGraph
Enclosing class:
ModelRelationshipQueries

public static final class ModelRelationshipQueries.OwnedRelationshipGraph extends Object
Mutable commit-scoped view of relationships that own the child lifecycle. Deleted children deliberately remain until the caller has verified that every current descendant is a delete target; removeModel(String) advances the view after an accepted plan in a commit batch.
  • Constructor Details

    • OwnedRelationshipGraph

      public OwnedRelationshipGraph()
  • Method Details

    • add

      public void add(String parentId, String childId)
      Adds one current owned child edge.
    • add

      public void add(ModelRelationshipQueries.Relationship relationship)
      Adds a relationship only when deletion of its parent owns the child lifecycle.
    • overlayChanges

      public void overlayChanges(Collection<ModelCommitAssignment.RelationshipStep> steps)
      Applies the final non-deletion relationship values from ordered commit steps.
    • removeModel

      public void removeModel(String modelId)
      Removes every incoming and outgoing owned edge for an accepted deleted Model.
    • descendants

      public List<String> descendants(Collection<String> roots)
      Returns all transitive owned descendants in deterministic traversal order.