Class TypeTypeRelation.Builder

java.lang.Object
org.kuali.rice.krms.api.repository.typerelation.TypeTypeRelation.Builder
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, ModelBuilder, TypeTypeRelationContract
Enclosing class:
TypeTypeRelation

public static final class TypeTypeRelation.Builder extends Object implements Serializable, ModelBuilder, TypeTypeRelationContract
A builder which can be used to construct TypeTypeRelation instances. Enforces the constraints of the TypeTypeRelationContract.
See Also:
  • Method Details

    • create

      public static TypeTypeRelation.Builder create(String fromTypeId, RelationshipType relationshipType, Integer sequenceNumber, String toTypeId)
    • create

      public static TypeTypeRelation.Builder create(TypeTypeRelationContract contract)
    • build

      public TypeTypeRelation build()
      Builds an instance of a TypeTypeRelation based on the current state of the builder.
      Specified by:
      build in interface ModelBuilder
      Returns:
      the fully-constructed TypeTypeRelation.
    • isActive

      public boolean isActive()
      Specified by:
      isActive in interface Inactivatable
    • getFromTypeId

      public String getFromTypeId()
      Description copied from interface: TypeTypeRelationContract
      This is the FromTypeId of the TypeTypeRelation

      The FromTypeId of the TypeTypeRelation

      Specified by:
      getFromTypeId in interface TypeTypeRelationContract
      Returns:
      the FromTypeId of the TypeTypeRelation
    • getId

      public String getId()
      Specified by:
      getId in interface Identifiable
    • getRelationshipType

      public RelationshipType getRelationshipType()
      Description copied from interface: TypeTypeRelationContract
      This is the RelationshipType of the TypeTypeRelation

      The RelationshipType of the TypeTypeRelation

      Specified by:
      getRelationshipType in interface TypeTypeRelationContract
      Returns:
      the RelationshipType of the TypeTypeRelation
    • getSequenceNumber

      public Integer getSequenceNumber()
      Specified by:
      getSequenceNumber in interface TypeTypeRelationContract
    • getToTypeId

      public String getToTypeId()
      Description copied from interface: TypeTypeRelationContract
      This is the ToTypeId of the TypeTypeRelation

      The ToTypeId of the TypeTypeRelation

      Specified by:
      getToTypeId in interface TypeTypeRelationContract
      Returns:
      the ToTypeId of the TypeTypeRelation
    • getVersionNumber

      public Long getVersionNumber()
      Specified by:
      getVersionNumber in interface Versioned
    • setActive

      public void setActive(boolean active)
      Sets the value of active on this builder to the given value.
      Parameters:
      active - the active value to set.
    • setFromTypeId

      public void setFromTypeId(String fromTypeId)
      Sets the value of fromTypeId on this builder to the given value.
      Parameters:
      fromTypeId - the fromTypeId value to set., must not be null or blank
      Throws:
      IllegalArgumentException - if the fromTypeId is null or blank
    • setId

      public void setId(String id)
      Sets the value of id on this builder to the given value.
      Parameters:
      id - the id value to set., may be null, representing the Object has not been persisted, but must not be blank.
      Throws:
      IllegalArgumentException - if the id is blank
    • setRelationshipType

      public void setRelationshipType(RelationshipType relationshipType)
      Sets the value of relationshipType on this builder to the given value.
      Parameters:
      relationshipType - the relationshipType value to set., must not be null
      Throws:
      IllegalArgumentException - if the relationshipType is null
    • setSequenceNumber

      public void setSequenceNumber(Integer sequenceNumber)
      Sets the value of sequenceNumber on this builder to the given value.
      Parameters:
      sequenceNumber - the sequenceNumber value to set., must not be null
      Throws:
      IllegalArgumentException - if the sequenceNumber is null
    • setToTypeId

      public void setToTypeId(String toTypeId)
      Sets the value of toTypeId on this builder to the given value.
      Parameters:
      toTypeId - the toTypeId value to set., must not be null or blank
      Throws:
      IllegalArgumentException - if the toTypeId is null or blank
    • setVersionNumber

      public void setVersionNumber(Long versionNumber)
      Sets the value of versionNumber on this builder to the given value.
      Parameters:
      versionNumber - the versionNumber value to set.