Interface ModelGraphResolver

All Known Implementing Classes:
DefaultModelRepository

public interface ModelGraphResolver
Optional repository capability for metadata-only Graph navigation. Queries return complete direct collections for the supplied identities at a shared boundary. A repository may additionally return complete ancestor collections when its protocol reads an ancestor closure; descendants are loaded one frontier at a time. Returned value suppliers must preserve that boundary and never skip replay errors. The historical mode denotes an explicitly historical read, not merely a pinned current boundary: pinning must not replace a Model's current document authority with event replay. Repositories without this capability retain their existing fully loaded Graph navigation.
  • Method Details

    • graphStagedValues

      ModelBatchScope.Snapshot graphStagedValues(io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
      Captures the current message-batch overlay once for a new navigation view.
    • loadCurrentGraphValue

      ModelGraphResolver.Value loadCurrentGraphValue(Object modelId, Class<?> modelType)
      Loads deliberately current state with its namespace boundary, ignoring any active handler boundary.
    • loadGraphProjection

      Graph<?> loadGraphProjection(String rootId, Class<?> rootType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary, boolean historical)
      Strictly materializes a full graph at the selected boundary without consulting later batch state.
    • loadGraphProjection

      default Graph<?> loadGraphProjection(String rootId, Class<?> rootType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary, boolean historical, Entity<?> resolvedRoot)
      Materializes relationships while retaining a root value whose identity or absence was already resolved. A resolver opting into metadata-only identity resolution must implement this operation for absent roots; silently resolving the supplied identity again could bind it to a different model.
    • loadGraphValue

      ModelGraphResolver.Value loadGraphValue(Object modelId, boolean exact, Class<?> modelType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
      Loads a source value and retains the coherent boundary that ordinary single-value APIs do not expose.
    • resolveGraphIdentity

      default ModelGraphResolver.Identity resolveGraphIdentity(Object modelId, Class<?> modelType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
      Resolves an identity without requiring its value. The returned supplier must retain the resolved identity, absence and boundary even if the alias changes later. Returning null (the default) retains a custom repository's existing value-based identity lookup, without opting into metadata-only identity resolution.
    • resolveGraphIdentity

      default ModelGraphResolver.Identity resolveGraphIdentity(Object modelId, boolean exact, Class<?> modelType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary)
      Resolves an exact persisted key without applying functional-ID affixes a second time.
    • resolveCurrentGraphIdentity

      default ModelGraphResolver.Identity resolveCurrentGraphIdentity(Object modelId, Class<?> modelType)
      Optional metadata-first current root; the default retains the existing current-value route.
    • resolveUntypedGraphIdentity

      default ModelGraphResolver.Identity resolveUntypedGraphIdentity(Object modelId)
      Optional untyped root discovery; an implementation supplies its resolved class through ModelGraphResolver.HeadValue.
    • loadGraphValues

      Map<String, Entity<?>> loadGraphValues(Map<String,Class<?>> modelTypes, io.fluxzero.common.api.modeling.ModelReadBoundary boundary, Map<String, Entity<?>> staged, boolean historical)
      Reconstructs explicitly requested values together; unrelated metadata nodes must remain unloaded.
    • loadGraphRelations

      ModelGraphResolver.Relations loadGraphRelations(List<String> modelIds, io.fluxzero.common.api.modeling.ModelRelationshipRead.Direction direction, io.fluxzero.common.api.modeling.ModelReadBoundary boundary, Map<String, Entity<?>> staged, boolean historical)
      Reads direct relationships and heads without loading values. The supplied staged snapshot takes precedence over durable relationships and must also be used by returned value suppliers. No implicit later batch reads.