Interface ModelAncestorResolver

All Known Implementing Classes:
DefaultModelRepository

public interface ModelAncestorResolver
Optional repository capability for resolving a typed ancestor from relationship identities before loading model values. Graph uses this only for a detached, lazy graph node; repositories without this capability retain the ordinary parent-by-parent fallback.
  • Method Summary

    Modifier and Type
    Method
    Description
    <A> Optional<Graph<A>>
    loadAncestorGraph(String modelId, Class<?> modelType, Class<A> ancestorType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
    Resolves and loads only the closest ancestor assignable to ancestorType at the graph's read boundary.
    default <A> List<Graph<A>>
    loadAncestorGraphs(String modelId, Class<?> modelType, Class<A> ancestorType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
    Resolves every reachable ancestor assignable to ancestorType at one boundary.
  • Method Details

    • loadAncestorGraph

      <A> Optional<Graph<A>> loadAncestorGraph(String modelId, Class<?> modelType, Class<A> ancestorType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
      Resolves and loads only the closest ancestor assignable to ancestorType at the graph's read boundary. Intermediate parent values must remain unloaded.
    • loadAncestorGraphs

      default <A> List<Graph<A>> loadAncestorGraphs(String modelId, Class<?> modelType, Class<A> ancestorType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
      Resolves every reachable ancestor assignable to ancestorType at one boundary.

      The singular method remains the ergonomic default for normal graph traversal. Change subscriptions use this form because one changed model may be shared by multiple roots.