Class EntityMetadata
java.lang.Object
io.fluxzero.sdk.modeling.EntityMetadata
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA centrally cached structural graph-projection root consumed by repository commits.static enumstatic final recordModel-aware handler descriptor.static final recordA model value,Entity<Model>,Graph<Model>or ordered graph collection parameter needed by a handler.static final recordOne outgoing parent relationship declared by a child model.static final recordOne resolved outgoing relationship, shared by Graph, batch, replay and commit consumers.static final recordCached property metadata with a compiled reader.static final recordAggregate-neutral persistence settings of an explicitly annotated root.static enumstatic final recordShared immutable snapshot trigger and retention settings for Aggregate and Model roots.static final recordStorage-neutral effects of one resolved transition.static final recordShared resolved policy for one Aggregate or Model transition. -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanacceptsPayload(EntityMetadata.HandlerMethod handler, Class<?> payloadType) Returns whether a model handler can structurally consume the supplied payload type.Returns the complete aliases declared by the supplied model value, ornullwhen its type does not participate in independent-model alias persistence.static booleancompatibleTypes(Class<?> left, Class<?> right) Returns whether two declared model types can describe the same runtime value.entityId()functionalIdOf(Object value) Returns the functional value held by this type'sEntityIdproperty.Optional<io.fluxzero.common.api.modeling.ModelGraphProjectionConfiguration> Returns this root's application-resolved materialized graph definition, if enabled.Optional<io.fluxzero.common.api.modeling.ModelGraphProjectionConfiguration> graphProjectionConfiguration(Collection<Class<?>> knownModelTypes) Returns this root's durable graph definition including every known model schema that can be placed below it.graphProjectionRoots(Class<?> modelType) Returns every materialized projection root reachable through this model's typed parent relationships.booleanWhether this model declares at least one independently persisted alias.booleanidentifies(String repositoryId, Object value) Returns whether a non-null model value carries the supplied exact repository identity.booleanisModel()Returns the application-resolved collection that owns this Model's current document, if it has one.Returns the collection queried for a current document, including the historical empty-document fallback for a non-event-sourced Model that does not materialize one itself.static EntityMetadataReturns the centrally cached entity metadata for a Java type.parentRelationships(String modelId, Object value) Resolves and deduplicates the outgoing parent relationships of one model value.booleanReturns whether this model's persisted identity is scoped by a parent relationship.booleanWhether this model is placed in an automatically composed graph through at least one explicit parent path.repositoryId(Object functionalId) Returns the exact repository identity for a functional identifier of this type.repositoryId(Object functionalId, Object source) Returns the repository identity for a known functional ID, reading parent scope from the supplied source only when this model explicitly opted into parent-scoped identity.repositoryId(Object functionalId, Object parentId, Class<?> parentType) Resolves a parent-scoped primary identity from a functional child ID and explicit parent.repositoryIdOf(Object value) Returns the exact repository identity read from this type'sEntityIdproperty.intrevision()Returns this type's serializer revision.Returns aggregate-neutral persistence settings for an explicitly annotated root.Class<?> type()static EntityMetadataReturns and validates the centrally cached metadata, including all statically typed parent relations reachable from this type.
-
Method Details
-
of
Returns the centrally cached entity metadata for a Java type. -
validate
Returns and validates the centrally cached metadata, including all statically typed parent relations reachable from this type.Same-type recursive relations and relations using untyped IDs are checked for concrete ID cycles when their relationship deltas are committed.
-
acceptsPayload
Returns whether a model handler can structurally consume the supplied payload type. -
compatibleTypes
-
type
-
isModel
public boolean isModel() -
revision
public int revision()Returns this type's serializer revision. -
rootConfiguration
Returns aggregate-neutral persistence settings for an explicitly annotated root. -
entityId
-
repositoryId
-
repositoryIdOf
-
parentScopedEntityId
public boolean parentScopedEntityId()Returns whether this model's persisted identity is scoped by a parent relationship. -
functionalIdOf
-
identifies
-
repositoryId
-
repositoryId
-
hasAliases
public boolean hasAliases()Whether this model declares at least one independently persisted alias. -
aliases
-
parentReferences
-
parentRelationships
Resolves and deduplicates the outgoing parent relationships of one model value.This is the only runtime extraction of
Parentvalues. Graph views, batch overlays, cascade selection and repository commits consume this immutable result instead of independently reading structural metadata. -
participatesInGraphComposition
public boolean participatesInGraphComposition()Whether this model is placed in an automatically composed graph through at least one explicit parent path.Graph participation is independent from
Model.persistence(): a Model can supply an internal current document for composition without exposing a direct document through its own collection. -
modelDocumentCollection
-
modelDocumentReadCollection
Returns the collection queried for a current document, including the historical empty-document fallback for a non-event-sourced Model that does not materialize one itself. -
graphProjectionConfiguration
public Optional<io.fluxzero.common.api.modeling.ModelGraphProjectionConfiguration> graphProjectionConfiguration()Returns this root's application-resolved materialized graph definition, if enabled. -
graphProjectionConfiguration
public Optional<io.fluxzero.common.api.modeling.ModelGraphProjectionConfiguration> graphProjectionConfiguration(Collection<Class<?>> knownModelTypes) Returns this root's durable graph definition including every known model schema that can be placed below it. -
graphProjectionRoots
Returns every materialized projection root reachable through this model's typed parent relationships. -
handlerMethods
-
applyMethods
-