Class AddDerivedRelationTypeRequest

Object
AddDerivedRelationTypeRequest
All Implemented Interfaces:
Serializable

public class AddDerivedRelationTypeRequest extends Object implements Serializable
A request object for creating a new derived relation type.

This class represents the data structure used to create a new derived relation type with all its required properties. Unlike regular relation types, derived relation types are defined by a path of intermediate nodes that connect the source and target types.

The request includes both basic relation type properties and the complete path definition with source, target, and intermediate nodes that define the derived relation type's behavior.

See Also:
  • Constructor Details

    • AddDerivedRelationTypeRequest

      public AddDerivedRelationTypeRequest(UUID id, String publicId, String description, String sourceTypePublicId, String targetTypePublicId, String role, String coRole, PathSourceNodeRequest sourceNode, PathTargetNodeRequest targetNode, List<PathIntermediateNodeRequest> intermediateNodes)
      Constructs a new AddDerivedRelationTypeRequest with the specified parameters.

      This constructor creates a request to add a new derived relation type with all its required properties. The derived relation type is defined by a path of intermediate nodes that connect the source and target types.

      Parameters:
      id - the unique identifier of the derived relation type (optional, will be generated if not provided)
      publicId - the public identifier of the derived relation type (optional, will be generated if not provided)
      description - the description of the derived relation type (optional)
      sourceTypePublicId - the public ID of the source type of the derived relation type (optional)
      targetTypePublicId - the public ID of the target type of the derived relation type (optional)
      role - the role name for the source side of the relation (required)
      coRole - the co-role name for the target side of the relation (required)
      sourceNode - the source node configuration (required)
      targetNode - the target node configuration (required)
      intermediateNodes - the list of intermediate nodes in the path (required, must not be empty)
    • AddDerivedRelationTypeRequest

      public AddDerivedRelationTypeRequest()
  • Method Details

    • id

      public UUID id()
      Returns the unique identifier of the derived relation type.
      Returns:
      the unique identifier, or null if not specified (will be generated)
    • publicId

      @Size(min=1, max=260) public @Size(min=1,max=260) String publicId()
      Returns the public identifier of the derived relation type.
      Returns:
      the public identifier, or null if not specified (will be generated)
    • description

      @Size(max=4000) public @Size(max=4000) String description()
      Returns the description of the derived relation type.
      Returns:
      the description, or null if not specified
    • sourceTypePublicId

      @Size(min=1, max=260) @NotNull public @Size(min=1,max=260) @NotNull String sourceTypePublicId()
      Returns the public ID of the source type for the derived relation type.
      Returns:
      the source type public ID, or null if not specified
    • targetTypePublicId

      @Size(min=1, max=260) @NotNull public @Size(min=1,max=260) @NotNull String targetTypePublicId()
      Returns the public ID of the target type for the derived relation type.
      Returns:
      the target type public ID, or null if not specified
    • role

      @Size(min=1, max=255) @NotNull public @Size(min=1,max=255) @NotNull String role()
      Returns the role name for the source side of the relation.
      Returns:
      the role name
    • coRole

      @Size(min=1, max=255) @NotNull public @Size(min=1,max=255) @NotNull String coRole()
      Returns the co-role name for the target side of the relation.
      Returns:
      the co-role name
    • sourceNode

      @NotNull @Valid public @NotNull @Valid PathSourceNodeRequest sourceNode()
      Returns the source node configuration for the derived relation type.
      Returns:
      the source node configuration
    • targetNode

      @NotNull @Valid public @NotNull @Valid PathTargetNodeRequest targetNode()
      Returns the target node configuration for the derived relation type.
      Returns:
      the target node configuration
    • intermediateNodes

      @NotNull @Valid public @NotNull @Valid List<@NotNull PathIntermediateNodeRequest> intermediateNodes()
      Returns the list of intermediate nodes in the path for the derived relation type.
      Returns:
      the intermediate nodes list (must not be empty)
    • builder

      public static AddDerivedRelationTypeRequest.Builder builder()
    • getId

      public UUID getId()
      The id of the Derived Relation Type. If not specified, a unique id will be generated.
    • getPublicId

      public String getPublicId()
      The public id of the Derived Relation Type. If not specified, a unique public id will be generated.
    • getDescription

      public String getDescription()
      The description of the Derived Relation Type.
    • getSourceTypePublicId

      public String getSourceTypePublicId()
      The public id of the source type of the Derived Relation Type.
    • getTargetTypePublicId

      public String getTargetTypePublicId()
      The public id of the target type of the Derived Relation Type.
    • getRole

      public String getRole()
      The role of the Derived Relation Type.
    • getCoRole

      public String getCoRole()
      The co-role of the Derived Relation Type.
    • getSourceNode

      public PathSourceNodeRequest getSourceNode()
      The source node of the Derived Relation Type.
    • getTargetNode

      public PathTargetNodeRequest getTargetNode()
      The target node of the Derived Relation Type.
    • getIntermediateNodes

      public List<@NotNull PathIntermediateNodeRequest> getIntermediateNodes()
      The intermediate nodes of the Derived Relation Type. This list must not be empty.
    • setId

      public void setId(UUID id)
      The id of the Derived Relation Type. If not specified, a unique id will be generated.
    • setPublicId

      public void setPublicId(String publicId)
      The public id of the Derived Relation Type. If not specified, a unique public id will be generated.
    • setDescription

      public void setDescription(String description)
      The description of the Derived Relation Type.
    • setSourceTypePublicId

      public void setSourceTypePublicId(String sourceTypePublicId)
      The public id of the source type of the Derived Relation Type.
    • setTargetTypePublicId

      public void setTargetTypePublicId(String targetTypePublicId)
      The public id of the target type of the Derived Relation Type.
    • setRole

      public void setRole(String role)
      The role of the Derived Relation Type.
    • setCoRole

      public void setCoRole(String coRole)
      The co-role of the Derived Relation Type.
    • setSourceNode

      public void setSourceNode(PathSourceNodeRequest sourceNode)
      The source node of the Derived Relation Type.
    • setTargetNode

      public void setTargetNode(PathTargetNodeRequest targetNode)
      The target node of the Derived Relation Type.
    • setIntermediateNodes

      public void setIntermediateNodes(List<@NotNull PathIntermediateNodeRequest> intermediateNodes)
      The intermediate nodes of the Derived Relation Type. This list must not be empty.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object