Class EntityMetadata
java.lang.Object
io.fluxzero.sdk.modeling.EntityMetadata
Cached structural metadata for an entity, persisted root, or type containing model handlers.
Instances are owned by ReflectionUtils.TypeMetadata; callers must use of(Class) instead of
constructing or caching this metadata independently.
-
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.configuredModelDocumentCollection(String modelNamePrefix) Returns the canonical Model source collection, shared with node search when enabled.entityId()Returns the entity identifier property, if one was discovered.functionalIdOf(Object value) Returns the functional value held by this type'sEntityIdproperty.Scope of a Graph query rooted here, independent of the root's inherited activation.Returns this root's application-resolved materialized graph definition, if enabled.graphProjectionConfiguration(Collection<Class<?>> knownModelTypes) Returns this root's durable graph definition including every known model schema that can be placed below it.graphProjectionConfiguration(Collection<Class<?>> knownModelTypes, String modelNamePrefix) Returns the durable Graph definition using an already application-scoped Model-name prefix.graphProjectionRoots(Class<?> modelType) Returns every materialized projection root reachable through this model's typed parent relationships.graphProjectionRoots(Class<?> modelType, Collection<Class<?>> knownModelTypes) Includes registered concrete alternatives of polymorphic parent contracts, recursively through their ancestors.graphProjectionRoots(Class<?> modelType, Supplier<? extends Collection<Class<?>>> knownModelTypes) Avoids fetching or copying the application catalog for the usual final, statically declared parent types.graphSearchConfiguration(Collection<Class<?>> knownModelTypes, String modelNamePrefix) Shared composition definition for both live and stored Graph search.Returns the discovered entity handler methods and their kinds.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 whether the type carries Model configuration.booleanWhether an explicit request on this type or a composed ancestor includes this node type in search.Returns the prefix-independent durable name of this concrete Model type.booleanWhether this Model independently needs an indexed internal current document for Graph operations.Returns this Model's canonical current-document collection, if maintained.modelDocumentCollection(String modelNamePrefix) Returns this Model's canonical collection using an application-scoped name prefix.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.modelDocumentReadCollection(String modelNamePrefix) Returns the read collection using an already application-scoped name prefix.modelSourceDocumentCollection(String modelNamePrefix) Internal state and indexed node search share one canonical document; search never changes load authority.static EntityMetadataReturns the centrally cached entity metadata for a Java type.Returns the discovered parent-reference descriptors for this 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.static List<EntityMetadata.ParentReference> scheduleParentReferences(Class<?> payloadType) Returns cached parent declarations for a schedule payload without treating that payload as a Model.Class<?> type()Returns the class described by this entity metadata.static EntityMetadataReturns and validates the centrally cached metadata, including all statically typed parent relations reachable from this type.voidvalidateSearchScope(Collection<Class<?>> knownModelTypes) Rejects a Graph scope whose declared child contract cannot maintain the required search source on every writer.
-
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
Returns the class described by this entity metadata. -
isModel
public boolean isModel()Returns whether the type carries Model configuration. -
localModelName
Returns the prefix-independent durable name of this concrete Model type. -
revision
public int revision()Returns this type's serializer revision. -
rootConfiguration
Returns aggregate-neutral persistence settings for an explicitly annotated root. -
entityId
Returns the entity identifier property, if one was discovered. -
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
Returns the discovered parent-reference descriptors for this type. -
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. -
maintainsGraphComponentDocument
public boolean maintainsGraphComponentDocument()Whether this Model independently needs an indexed internal current document for Graph operations. -
isSearchable
public boolean isSearchable()Whether an explicit request on this type or a composed ancestor includes this node type in search. -
graphComposition
Scope of a Graph query rooted here, independent of the root's inherited activation. -
modelDocumentCollection
-
modelDocumentCollection
-
modelSourceDocumentCollection
-
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. -
modelDocumentReadCollection
-
configuredModelDocumentCollection
-
graphProjectionConfiguration
Returns this root's application-resolved materialized graph definition, if enabled. -
graphProjectionConfiguration
public Optional<ModelGraphProjectionConfiguration> graphProjectionConfiguration(Collection<Class<?>> knownModelTypes) Returns this root's durable graph definition including every known model schema that can be placed below it. -
graphProjectionConfiguration
public Optional<ModelGraphProjectionConfiguration> graphProjectionConfiguration(Collection<Class<?>> knownModelTypes, String modelNamePrefix) Returns the durable Graph definition using an already application-scoped Model-name prefix. -
graphSearchConfiguration
public Optional<ModelGraphProjectionConfiguration> graphSearchConfiguration(Collection<Class<?>> knownModelTypes, String modelNamePrefix) Shared composition definition for both live and stored Graph search. -
validateSearchScope
Rejects a Graph scope whose declared child contract cannot maintain the required search source on every writer. -
graphProjectionRoots
Returns every materialized projection root reachable through this model's typed parent relationships. -
graphProjectionRoots
public static List<EntityMetadata.GraphProjectionRoot> graphProjectionRoots(Class<?> modelType, Collection<Class<?>> knownModelTypes) Includes registered concrete alternatives of polymorphic parent contracts, recursively through their ancestors. The result is a conservative type set; the Runtime selects actual affected roots from the changed Model IDs. -
graphProjectionRoots
public static List<EntityMetadata.GraphProjectionRoot> graphProjectionRoots(Class<?> modelType, Supplier<? extends Collection<Class<?>>> knownModelTypes) Avoids fetching or copying the application catalog for the usual final, statically declared parent types. -
handlerMethods
Returns the discovered entity handler methods and their kinds. -
applyMethods
-
scheduleParentReferences
Returns cached parent declarations for a schedule payload without treating that payload as a Model. Composition settings do not add schedules to Graphs. Identity conversion uses the same contract as Models.
-