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

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

public static final class RolePermission.Builder
extends Object
implements RolePermissionContract, ModelBuilder, Serializable

This builder constructs a RolePermission enforcing the constraints of the RolePermissionContract.

See Also:
Serialized Form

Method Summary
 RolePermission build()
          Returns an instance of the object being built by this builder based on the current state of the builder.
static RolePermission.Builder create(RolePermissionContract contract)
          Creates a RolePermission from an existing RolePermissionContract.
static RolePermission.Builder create(String id, String roleId, String permissionId)
          Creates a RolePermission with the required fields.
 String getId()
          The unique identifier for an object.
 String getObjectId()
          Return the globally unique object id of this object.
 String getPermissionId()
          The Permission ID referenced by the Role Permission.
 String getRoleId()
          The Role ID referenced by the Role Permission.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 void setActive(boolean active)
           
 void setId(String id)
           
 void setObjectId(String objectId)
           
 void setPermissionId(String permissionId)
           
 void setRoleId(String roleId)
           
 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 RolePermission.Builder create(String id,
                                            String roleId,
                                            String permissionId)
Creates a RolePermission with the required fields.


create

public static RolePermission.Builder create(RolePermissionContract contract)
Creates a RolePermission from an existing RolePermissionContract.


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)

getPermissionId

public String getPermissionId()
Description copied from interface: RolePermissionContract
The Permission ID referenced by the Role Permission.

Specified by:
getPermissionId in interface RolePermissionContract
Returns:
permissionId

setPermissionId

public void setPermissionId(String permissionId)

getRoleId

public String getRoleId()
Description copied from interface: RolePermissionContract
The Role ID referenced by the Role Permission.

Specified by:
getRoleId in interface RolePermissionContract
Returns:
roleId

setRoleId

public void setRoleId(String roleId)

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)

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)

build

public RolePermission 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.