public static class KrmsTypeAttribute.Builder extends Object implements KrmsTypeAttributeContract, ModelBuilder, Serializable
| Modifier and Type | Method and Description |
|---|---|
KrmsTypeAttribute |
build()
Builds an instance of a KrmsTypeAttribute based on the current state of the builder.
|
static KrmsTypeAttribute.Builder |
create(KrmsTypeAttributeContract contract)
Creates a builder by populating it with data from the given
KrmsTypeAttributeContract. |
static KrmsTypeAttribute.Builder |
create(String typeId,
String attributeDefinitionId,
Integer sequenceNumber)
Creates a builder from the given parameters.
|
String |
getAttributeDefinitionId()
Returns the id of the KrmsAttributeDefinition of the attribute.
|
String |
getId() |
Integer |
getSequenceNumber()
Returns the sequence number of the attribute within the KrmsTypeDefinition collection.
|
String |
getTypeId()
Returns the id of the KrmsTypeDefinition to which the attribute applies
|
Long |
getVersionNumber() |
boolean |
isActive() |
void |
setActive(boolean active)
sets the active indicator value
|
void |
setAttributeDefinitionId(String attributeDefinitionId)
Sets the id of the KrmsAttributeDefinition that describes this attribute.
|
void |
setId(String id)
Sets the value of the id on this builder to the given value.
|
void |
setSequenceNumber(Integer sequenceNumber)
Sets the sequence number.
|
void |
setTypeId(String typeId)
Sets the id of the KrmsTypeDefinition to which this attribute belongs.
|
void |
setVersionNumber(Long versionNumber)
Sets the version number for this object.
|
public static KrmsTypeAttribute.Builder create(String typeId, String attributeDefinitionId, Integer sequenceNumber)
typeId - the KrmsType IdattributeDefinitionId - The attributeDefinitionIdsequenceNumber - IllegalArgumentException - if the either the id, name or namespace is null or blankpublic static KrmsTypeAttribute.Builder create(KrmsTypeAttributeContract contract)
KrmsTypeAttributeContract.contract - the contract from which to populate this builderIllegalArgumentException - if the contract is nullpublic void setId(String id)
id - the id value to set; can be null; a null id is an indicator
the this has not yet been persisted to the database.public void setTypeId(String typeId)
typeId - the id of the KrmsTypeDefinition; may not be null or blankIllegalArgumentException - if the typeId is null or blankpublic void setAttributeDefinitionId(String attributeDefinitionId)
attributeDefinitionId - id of the KrmsAttributeDefinition; may not be null or blankIllegalArgumentException - if the attributeDefinitionId is null or blankpublic void setSequenceNumber(Integer sequenceNumber)
sequenceNumber - the order of the attribute in the attribute list; cannot be nullIllegalArgumentException - if the sequenceNumber is nullpublic void setActive(boolean active)
active - boolean value to setpublic void setVersionNumber(Long versionNumber)
In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.
versionNumber - the version number, or null if one has not been assigned yetpublic String getId()
getId in interface Identifiablepublic String getTypeId()
KrmsTypeAttributeContractA KRMS type definition has zero or more attributes associated with it. The id field indicates which type definition this attribute is associated with. It is the id of a KrmsTypeDefinition related to the attribute. This required field may not be null or blank.
getTypeId in interface KrmsTypeAttributeContractpublic String getAttributeDefinitionId()
KrmsTypeAttributeContractThe attribute definition contains metadata about the attribute. This is a required field and may not be null or blank. Many attributes may share the same attribute definition.
getAttributeDefinitionId in interface KrmsTypeAttributeContractpublic Integer getSequenceNumber()
KrmsTypeAttributeContractThe list of attributes is an ordered list. This value represents the position in the list and cannot be null.
getSequenceNumber in interface KrmsTypeAttributeContractpublic boolean isActive()
isActive in interface Inactivatablepublic Long getVersionNumber()
getVersionNumber in interface Versionedpublic KrmsTypeAttribute build()
build in interface ModelBuilderCopyright © 2005–2016 The Kuali Foundation. All rights reserved.