Record Class EntityMetadata.ParentReference
java.lang.Object
java.lang.Record
io.fluxzero.sdk.modeling.EntityMetadata.ParentReference
- Record Components:
idType- scalar ID type, or the resolved collection element typepathInParent- optional parent-relative automatic composition pathparentModelTypes- inferred or explicitly declared possible parent model types; empty for an untyped IDapiDoc- optional documentation for the list-valued automatic composition pathdeleteOnParentDeletion- whether deletion of this parent owns the child lifecyclepropagateSearch- whether ancestor search composition may traverse this edgevalidateAncestors- whether cascading assertions may traverse this parent routemaxChildren- maximum children of this Model type and path, or -1 for unlimitedrequired- whether at least one existing parent is requiredpreventParentDeletion- whether surviving children block logical parent deletion
- Enclosing class:
EntityMetadata
public static record EntityMetadata.ParentReference(EntityMetadata.Property property, Class<?> idType, String pathInParent, List<Class<?>> parentModelTypes, ApiDoc apiDoc, boolean deleteOnParentDeletion, boolean propagateSearch, boolean validateAncestors, int maxChildren, boolean required, boolean preventParentDeletion)
extends Record
One outgoing parent relationship declared by a child model.
-
Constructor Summary
ConstructorsConstructorDescriptionParentReference(EntityMetadata.Property property, Class<?> idType, String pathInParent, List<Class<?>> parentModelTypes, ApiDoc apiDoc, boolean deleteOnParentDeletion, boolean propagateSearch, boolean validateAncestors, int maxChildren, boolean required, boolean preventParentDeletion) Creates an instance of aParentReferencerecord class. -
Method Summary
Modifier and TypeMethodDescriptionapiDoc()Returns the value of theapiDocrecord component.booleanReturns whether a non-empty path in the parent enables automatic Graph composition for this reference.booleanWhether this reference declares any SDK-provided relationship check.booleanReturns the value of thedeleteOnParentDeletionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Class<?> idType()Returns the value of theidTyperecord component.intReturns the value of themaxChildrenrecord component.Class<?> Returns the statically unique parent type, ornullfor untyped and polymorphic references.Class<?> parentModelType(Object parentId) Resolves the concrete parent model type for one runtime parent ID.Returns the value of theparentModelTypesrecord component.Returns the value of thepathInParentrecord component.booleanReturns the value of thepreventParentDeletionrecord component.booleanReturns the value of thepropagateSearchrecord component.booleanWhether this edge participates in search composition and inherited search activation.property()Returns the value of thepropertyrecord component.Reads the parent-reference value from the supplied target.Collection<?> Reads distinct scalar parent IDs; a null property or empty collection has no parents.repositoryId(Object parentId) Returns the parent's exact persisted identity for a functional parent ID value.booleanrequired()Returns the value of therequiredrecord component.booleanReturns whether this reference can point to the supplied parent model type.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thevalidateAncestorsrecord component.
-
Constructor Details
-
ParentReference
public ParentReference(EntityMetadata.Property property, Class<?> idType, String pathInParent, List<Class<?>> parentModelTypes, ApiDoc apiDoc, boolean deleteOnParentDeletion, boolean propagateSearch, boolean validateAncestors, int maxChildren, boolean required, boolean preventParentDeletion) Creates an instance of aParentReferencerecord class.- Parameters:
property- the value for thepropertyrecord componentidType- the value for theidTyperecord componentpathInParent- the value for thepathInParentrecord componentparentModelTypes- the value for theparentModelTypesrecord componentapiDoc- the value for theapiDocrecord componentdeleteOnParentDeletion- the value for thedeleteOnParentDeletionrecord componentpropagateSearch- the value for thepropagateSearchrecord componentvalidateAncestors- the value for thevalidateAncestorsrecord componentmaxChildren- the value for themaxChildrenrecord componentrequired- the value for therequiredrecord componentpreventParentDeletion- the value for thepreventParentDeletionrecord component
-
-
Method Details
-
read
-
readIds
Reads distinct scalar parent IDs; a null property or empty collection has no parents. -
parentModelType
Returns the statically unique parent type, ornullfor untyped and polymorphic references. -
supports
Returns whether this reference can point to the supplied parent model type. -
parentModelType
-
repositoryId
-
automaticallyComposed
public boolean automaticallyComposed()Returns whether a non-empty path in the parent enables automatic Graph composition for this reference. -
propagatesSearch
public boolean propagatesSearch()Whether this edge participates in search composition and inherited search activation. -
constrained
public boolean constrained()Whether this reference declares any SDK-provided relationship check. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
property
Returns the value of thepropertyrecord component.- Returns:
- the value of the
propertyrecord component
-
idType
-
pathInParent
Returns the value of thepathInParentrecord component.- Returns:
- the value of the
pathInParentrecord component
-
parentModelTypes
Returns the value of theparentModelTypesrecord component.- Returns:
- the value of the
parentModelTypesrecord component
-
apiDoc
-
deleteOnParentDeletion
public boolean deleteOnParentDeletion()Returns the value of thedeleteOnParentDeletionrecord component.- Returns:
- the value of the
deleteOnParentDeletionrecord component
-
propagateSearch
public boolean propagateSearch()Returns the value of thepropagateSearchrecord component.- Returns:
- the value of the
propagateSearchrecord component
-
validateAncestors
public boolean validateAncestors()Returns the value of thevalidateAncestorsrecord component.- Returns:
- the value of the
validateAncestorsrecord component
-
maxChildren
public int maxChildren()Returns the value of themaxChildrenrecord component.- Returns:
- the value of the
maxChildrenrecord component
-
required
-
preventParentDeletion
public boolean preventParentDeletion()Returns the value of thepreventParentDeletionrecord component.- Returns:
- the value of the
preventParentDeletionrecord component
-