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.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceOptional head evidence carried by a lazy entity supplier, without allocating a separate metadata wrapper per node.static final recordOne resolved identity and lazy value at a shared boundary; absent identities must not be resolved again.static final recordOne head with optional local class knowledge and a lazy, exact-boundary authoritative value.static final recordCoherent metadata for the requested direct relationship collections, including empty ones.static final recordA source value together with the exact relationship boundary established while reading it. -
Method Summary
Modifier and TypeMethodDescriptiongraphStagedValues(io.fluxzero.common.api.modeling.ModelReadBoundary boundary) Captures the current message-batch overlay once for a new navigation view.loadCurrentGraphValue(Object modelId, Class<?> modelType) Loads deliberately current state with its namespace boundary, ignoring any active handler boundary.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.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.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.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.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.default ModelGraphResolver.IdentityresolveCurrentGraphIdentity(Object modelId, Class<?> modelType) Optional metadata-first current root; the default retains the existing current-value route.default ModelGraphResolver.IdentityresolveGraphIdentity(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.default ModelGraphResolver.IdentityresolveGraphIdentity(Object modelId, Class<?> modelType, io.fluxzero.common.api.modeling.ModelReadBoundary boundary) Resolves an identity without requiring its value.default ModelGraphResolver.IdentityresolveUntypedGraphIdentity(Object modelId) Optional untyped root discovery; an implementation supplies its resolved class throughModelGraphResolver.HeadValue.
-
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
Loads deliberately current state with its namespace boundary, ignoring any active handler boundary. -
loadGraphProjection
-
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. Returningnull(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
Optional metadata-first current root; the default retains the existing current-value route. -
resolveUntypedGraphIdentity
Optional untyped root discovery; an implementation supplies its resolved class throughModelGraphResolver.HeadValue. -
loadGraphValues
-
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.
-