Record Class EntityMetadata.ParentRelationship

java.lang.Object
java.lang.Record
io.fluxzero.sdk.modeling.EntityMetadata.ParentRelationship
Enclosing class:
EntityMetadata

public static record EntityMetadata.ParentRelationship(String parentId, Class<?> parentType, String pathInParent, boolean deleteOnParentDeletion) extends Record
One resolved outgoing relationship, shared by Graph, batch, replay and commit consumers.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ParentRelationship(String parentId, Class<?> parentType, String pathInParent, boolean deleteOnParentDeletion)
    Creates an instance of a ParentRelationship record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    io.fluxzero.common.api.modeling.ModelRelationship
    Converts this structural relationship to its commit-wire value.
    io.fluxzero.common.api.modeling.ModelRelationship
    asCommitRelationship(String modelNamePrefix)
    Converts this relationship using an already application-scoped Model-name prefix.
    io.fluxzero.common.api.modeling.ModelGraphEdge
    Converts this structural relationship to one transient Graph edge.
    io.fluxzero.common.api.modeling.ModelGraphEdge
    asGraphEdge(String childId, String modelNamePrefix)
    Converts this relationship using an already application-scoped Model-name prefix.
    boolean
    Returns the value of the deleteOnParentDeletion record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the parentId record component.
    Returns the value of the parentType record component.
    Returns the value of the pathInParent record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ParentRelationship

      public ParentRelationship(String parentId, Class<?> parentType, String pathInParent, boolean deleteOnParentDeletion)
      Creates an instance of a ParentRelationship record class.
      Parameters:
      parentId - the value for the parentId record component
      parentType - the value for the parentType record component
      pathInParent - the value for the pathInParent record component
      deleteOnParentDeletion - the value for the deleteOnParentDeletion record component
  • Method Details

    • asCommitRelationship

      public io.fluxzero.common.api.modeling.ModelRelationship asCommitRelationship()
      Converts this structural relationship to its commit-wire value.
    • asCommitRelationship

      public io.fluxzero.common.api.modeling.ModelRelationship asCommitRelationship(String modelNamePrefix)
      Converts this relationship using an already application-scoped Model-name prefix.
    • asGraphEdge

      public io.fluxzero.common.api.modeling.ModelGraphEdge asGraphEdge(String childId)
      Converts this structural relationship to one transient Graph edge.
    • asGraphEdge

      public io.fluxzero.common.api.modeling.ModelGraphEdge asGraphEdge(String childId, String modelNamePrefix)
      Converts this relationship using an already application-scoped Model-name prefix.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • parentId

      public String parentId()
      Returns the value of the parentId record component.
      Returns:
      the value of the parentId record component
    • parentType

      public Class<?> parentType()
      Returns the value of the parentType record component.
      Returns:
      the value of the parentType record component
    • pathInParent

      public String pathInParent()
      Returns the value of the pathInParent record component.
      Returns:
      the value of the pathInParent record component
    • deleteOnParentDeletion

      public boolean deleteOnParentDeletion()
      Returns the value of the deleteOnParentDeletion record component.
      Returns:
      the value of the deleteOnParentDeletion record component