org.kuali.rice.kim.api.common.attribute
Class KimAttribute.Builder

java.lang.Object
  extended by org.kuali.rice.kim.api.common.attribute.KimAttribute.Builder
All Implemented Interfaces:
Serializable, Inactivatable, GloballyUnique, Identifiable, Versioned, ModelBuilder, KimAttributeContract
Enclosing class:
KimAttribute

public static final class KimAttribute.Builder
extends Object
implements KimAttributeContract, ModelBuilder, Serializable

This builder constructs an KimAttribute enforcing the constraints of the KimAttributeContract.

See Also:
Serialized Form

Method Summary
 KimAttribute build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static KimAttribute.Builder create(KimAttributeContract contract)
          creates a KimAttribute from an existing KimAttributeContract.
static KimAttribute.Builder create(String componentName, String attributeName, String namespaceCode)
          creates a KimAttribute with the required fields.
 String getAttributeLabel()
          The label for the kim attribute.
 String getAttributeName()
          The name of the attribute on the KimAttributeContract.getComponentName().
 String getComponentName()
          A fully-qualified class name which contains the KimAttributeContract.getAttributeName().
 String getId()
          The unique identifier for an object.
 String getNamespaceCode()
          The namespace code that this kim attribute belongs too.
 String getObjectId()
          Return the globally unique object id of this object.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setAttributeLabel(String attributeLabel)
           
 void setAttributeName(String attributeName)
           
 void setComponentName(String componentName)
           
 void setId(String id)
           
 void setNamespaceCode(String namespaceCode)
           
 void setObjectId(String objectId)
           
 void setVersionNumber(Long versionNumber)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static KimAttribute.Builder create(String componentName,
                                          String attributeName,
                                          String namespaceCode)
creates a KimAttribute with the required fields.


create

public static KimAttribute.Builder create(KimAttributeContract contract)
creates a KimAttribute from an existing KimAttributeContract.


getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

setId

public void setId(String id)

getComponentName

public String getComponentName()
Description copied from interface: KimAttributeContract
A fully-qualified class name which contains the KimAttributeContract.getAttributeName(). This cannot be null or a blank string.

Specified by:
getComponentName in interface KimAttributeContract
Returns:
the name

setComponentName

public void setComponentName(String componentName)

getAttributeName

public String getAttributeName()
Description copied from interface: KimAttributeContract
The name of the attribute on the KimAttributeContract.getComponentName(). This cannot be null or a blank string.

Specified by:
getAttributeName in interface KimAttributeContract
Returns:
the name

setAttributeName

public void setAttributeName(String attributeName)

getNamespaceCode

public String getNamespaceCode()
Description copied from interface: KimAttributeContract
The namespace code that this kim attribute belongs too. This cannot be null or a blank string.

Specified by:
getNamespaceCode in interface KimAttributeContract
Returns:
namespace code

setNamespaceCode

public void setNamespaceCode(String namespaceCode)

getAttributeLabel

public String getAttributeLabel()
Description copied from interface: KimAttributeContract
The label for the kim attribute. This is optional and can be null or blank.

Specified by:
getAttributeLabel in interface KimAttributeContract
Returns:
the label

setAttributeLabel

public void setAttributeLabel(String attributeLabel)

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

setActive

public void setActive(boolean active)

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. 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.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet

setVersionNumber

public void setVersionNumber(Long versionNumber)

getObjectId

public String getObjectId()
Description copied from interface: GloballyUnique
Return the globally unique object id of this object. In general, this value should only be null if the object has not yet been stored to a persistent data store.

Specified by:
getObjectId in interface GloballyUnique
Returns:
the objectId of this object, or null if it has not been set yet

setObjectId

public void setObjectId(String objectId)

build

public KimAttribute build()
Description copied from interface: ModelBuilder
Returns an instance of the object being built by this builder based on the current state of the builder. It should be possible to invoke this method more than once on the same builder. It should never return null;

Specified by:
build in interface ModelBuilder
Returns:
an instance of the object being built by this builder, should never return null


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.