org.kuali.rice.kim.api.role
Class Role.Builder

java.lang.Object
  extended by org.kuali.rice.kim.api.role.Role.Builder
All Implemented Interfaces:
Serializable, Inactivatable, GloballyUnique, Identifiable, Versioned, ModelBuilder, ModelObjectBasic, ModelObjectComplete, RoleContract
Enclosing class:
Role

public static final class Role.Builder
extends Object
implements RoleContract, ModelBuilder, ModelObjectComplete

See Also:
Serialized Form

Method Summary
 Role build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static Role.Builder create()
           
static Role.Builder create(RoleContract roleContract)
           
static Role.Builder create(String id, String name, String namespaceCode, String description, String kimTypeId)
           
 boolean equals(Object obj)
          All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.
 String getDescription()
          A full textual description of this role.
 String getId()
          The unique identifier for an object.
 String getKimTypeId()
          Provides the associated KimType identifier for this role.
 String getName()
          The human readable name for this role.
 String getNamespaceCode()
          A namespace for this role.
 String getObjectId()
          Return the globally unique object id of this object.
 Long getVersionNumber()
          Returns the version number for this object.
 int hashCode()
          All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setDescription(String description)
           
 void setId(String id)
           
 void setKimTypeId(String kimTypeId)
           
 void setName(String name)
           
 void setNamespaceCode(String namespaceCode)
           
 void setObjectId(String objectId)
           
 void setVersionNumber(Long versionNumber)
           
 String toString()
          This will return a proper string representation of the Model Object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static Role.Builder create()

create

public static Role.Builder create(String id,
                                  String name,
                                  String namespaceCode,
                                  String description,
                                  String kimTypeId)

create

public static Role.Builder create(RoleContract roleContract)

build

public Role 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

setId

public void setId(String id)

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

setNamespaceCode

public void setNamespaceCode(String namespaceCode)

getNamespaceCode

public String getNamespaceCode()
Description copied from interface: RoleContract
A namespace for this role. A namespace for a role identifies the system/module to which this role applies.

Specified by:
getNamespaceCode in interface RoleContract
Returns:
Namespace for the role.

setName

public void setName(String name)

getName

public String getName()
Description copied from interface: RoleContract
The human readable name for this role.

Specified by:
getName in interface RoleContract
Returns:
Human readable role name.

setDescription

public void setDescription(String description)

getDescription

public String getDescription()
Description copied from interface: RoleContract
A full textual description of this role. This String should provide a verbose description of the role, what it is meant to provide to principals assigned to it, and what permissions it implies.

Specified by:
getDescription in interface RoleContract
Returns:
Description of the role.

setKimTypeId

public void setKimTypeId(String kimTypeId)

getKimTypeId

public String getKimTypeId()
Description copied from interface: RoleContract
Provides the associated KimType identifier for this role. This controls what additional attributes are available.

Specified by:
getKimTypeId in interface RoleContract
Returns:
KimType Id

setActive

public void setActive(boolean active)

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.

setVersionNumber

public void setVersionNumber(Long versionNumber)

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

setObjectId

public void setObjectId(String objectId)

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

hashCode

public int hashCode()
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.hashCode() contract.

Specified by:
hashCode in interface ModelObjectComplete
Overrides:
hashCode in class Object
Returns:
the hashCode value

equals

public boolean equals(Object obj)
Description copied from interface: ModelObjectComplete
All "Complete" model object's should adhere to the ModelObjectComplete.equals(Object) contract.

Specified by:
equals in interface ModelObjectComplete
Overrides:
equals in class Object
Parameters:
obj - to object to compare for equality
Returns:
if equal

toString

public String toString()
Description copied from interface: ModelObjectBasic
This will return a proper string representation of the Model Object. All of the fields comprising the "public" api should be represented in the return value.

Specified by:
toString in interface ModelObjectBasic
Overrides:
toString in class Object
Returns:
the string representation


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.