org.kuali.rice.kim.api.responsibility
Class Responsibility.Builder

java.lang.Object
  extended by org.kuali.rice.kim.api.responsibility.Responsibility.Builder
All Implemented Interfaces:
Serializable, Inactivatable, GloballyUnique, Identifiable, Versioned, ModelBuilder, ResponsibilityContract
Enclosing class:
Responsibility

public static final class Responsibility.Builder
extends Object
implements ResponsibilityContract, ModelBuilder, Serializable

This builder constructs a Responsibility enforcing the constraints of the ResponsibilityContract.

See Also:
Serialized Form

Method Summary
 Responsibility build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Responsibility.Builder create(ResponsibilityContract contract)
          Creates a Responsibility from an existing ResponsibilityContract.
static Responsibility.Builder create(String namespaceCode, String name)
          Creates a Responsibility with the required fields.
 Map<String,String> getAttributes()
          Attributes for a Responsibility.
 String getDescription()
          The description of the Responsibility.
 String getId()
          The unique identifier for an object.
 String getName()
          The name of the Responsibility.
 String getNamespaceCode()
          The namespace code that this Responsibility belongs too.
 String getObjectId()
          Return the globally unique object id of this object.
 Template.Builder getTemplate()
          The Template referenced by the Responsibility.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setAttributes(Map<String,String> attributes)
           
 void setDescription(String description)
           
 void setId(String id)
           
 void setName(String name)
           
 void setNamespaceCode(String namespaceCode)
           
 void setObjectId(String objectId)
           
 void setTemplate(Template.Builder template)
           
 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 Responsibility.Builder create(String namespaceCode,
                                            String name)
Creates a Responsibility with the required fields.


create

public static Responsibility.Builder create(ResponsibilityContract contract)
Creates a Responsibility from an existing ResponsibilityContract.


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)

getNamespaceCode

public String getNamespaceCode()
Description copied from interface: ResponsibilityContract
The namespace code that this Responsibility belongs too.

Specified by:
getNamespaceCode in interface ResponsibilityContract
Returns:
namespaceCode

setNamespaceCode

public void setNamespaceCode(String namespaceCode)

getName

public String getName()
Description copied from interface: ResponsibilityContract
The name of the Responsibility.

Specified by:
getName in interface ResponsibilityContract
Returns:
name

setName

public void setName(String name)

getDescription

public String getDescription()
Description copied from interface: ResponsibilityContract
The description of the Responsibility.

Specified by:
getDescription in interface ResponsibilityContract
Returns:
description

setDescription

public void setDescription(String description)

getTemplate

public Template.Builder getTemplate()
Description copied from interface: ResponsibilityContract
The Template referenced by the Responsibility.

Specified by:
getTemplate in interface ResponsibilityContract
Returns:
templateId

setTemplate

public void setTemplate(Template.Builder template)

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)

getAttributes

public Map<String,String> getAttributes()
Description copied from interface: ResponsibilityContract
Attributes for a Responsibility.

Specified by:
getAttributes in interface ResponsibilityContract
Returns:
attributes

setAttributes

public void setAttributes(Map<String,String> attributes)

build

public Responsibility 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 © 2005-2012 The Kuali Foundation. All Rights Reserved.