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 Summary
Modifier and TypeMethodDescriptionbuild()Builds an instance of a TypeTypeRelation based on the current state of the builder.static TypeTypeRelation.Buildercreate(String fromTypeId, RelationshipType relationshipType, Integer sequenceNumber, String toTypeId) static TypeTypeRelation.Buildercreate(TypeTypeRelationContract contract) This is the FromTypeId of the TypeTypeRelationgetId()This is the RelationshipType of the TypeTypeRelationThis is the ToTypeId of the TypeTypeRelationbooleanisActive()voidsetActive(boolean active) Sets the value of active on this builder to the given value.voidsetFromTypeId(String fromTypeId) Sets the value of fromTypeId on this builder to the given value.voidSets the value of id on this builder to the given value.voidsetRelationshipType(RelationshipType relationshipType) Sets the value of relationshipType on this builder to the given value.voidsetSequenceNumber(Integer sequenceNumber) Sets the value of sequenceNumber on this builder to the given value.voidsetToTypeId(String toTypeId) Sets the value of toTypeId on this builder to the given value.voidsetVersionNumber(Long versionNumber) Sets the value of versionNumber on this builder to the given value.
-
Method Details
-
create
public static TypeTypeRelation.Builder create(String fromTypeId, RelationshipType relationshipType, Integer sequenceNumber, String toTypeId) -
create
-
build
Builds an instance of a TypeTypeRelation based on the current state of the builder.- Specified by:
buildin interfaceModelBuilder- Returns:
- the fully-constructed TypeTypeRelation.
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceInactivatable
-
getFromTypeId
Description copied from interface:TypeTypeRelationContractThis is the FromTypeId of the TypeTypeRelationThe FromTypeId of the TypeTypeRelation
- Specified by:
getFromTypeIdin interfaceTypeTypeRelationContract- Returns:
- the FromTypeId of the TypeTypeRelation
-
getId
- Specified by:
getIdin interfaceIdentifiable
-
getRelationshipType
Description copied from interface:TypeTypeRelationContractThis is the RelationshipType of the TypeTypeRelationThe RelationshipType of the TypeTypeRelation
- Specified by:
getRelationshipTypein interfaceTypeTypeRelationContract- Returns:
- the RelationshipType of the TypeTypeRelation
-
getSequenceNumber
- Specified by:
getSequenceNumberin interfaceTypeTypeRelationContract
-
getToTypeId
Description copied from interface:TypeTypeRelationContractThis is the ToTypeId of the TypeTypeRelationThe ToTypeId of the TypeTypeRelation
- Specified by:
getToTypeIdin interfaceTypeTypeRelationContract- Returns:
- the ToTypeId of the TypeTypeRelation
-
getVersionNumber
- Specified by:
getVersionNumberin interfaceVersioned
-
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
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
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
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
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
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
Sets the value of versionNumber on this builder to the given value.- Parameters:
versionNumber- the versionNumber value to set.
-