CodeBeamer 5.4.0.1-RC API

com.intland.codebeamer.persistence.dto
Class GroupRolePermissionDto

java.lang.Object
  extended by com.intland.codebeamer.persistence.dto.GroupRolePermissionDto
All Implemented Interfaces:
BaseDto, java.io.Serializable, java.lang.Comparable

public class GroupRolePermissionDto
extends java.lang.Object
implements BaseDto, java.lang.Comparable

TODO

See Also:
Serialized Form

Nested Class Summary
static class GroupRolePermissionDto.GroupComparator
          A special Comparator to compare/sort GroupRolePermissionDto by group
static class GroupRolePermissionDto.PermissionComparator
          A special Comparator to compare/sort GroupRolePermissionDto by permission
static class GroupRolePermissionDto.RoleComparator
          A special Comparator to compare/sort GroupRolePermissionDto by role
 
Constructor Summary
GroupRolePermissionDto()
           
GroupRolePermissionDto(GroupDto group, RoleDto role, PermissionDto permission, boolean granted)
           
GroupRolePermissionDto(GroupRolePermissionDto orig)
           
 
Method Summary
static int compareByGroup(GroupRolePermissionDto grp1, GroupRolePermissionDto grp2)
          Compare two GroupRolePermissionDtos by group.
static int compareByPermission(GroupRolePermissionDto grp1, GroupRolePermissionDto grp2)
          Compare two GroupRolePermissionDtos by permission description.
static int compareByRole(GroupRolePermissionDto grp1, GroupRolePermissionDto grp2)
          Compare two GroupRolePermissionDtos by role.
 int compareTo(java.lang.Object o)
           
 GroupDto getGroup()
           
 PermissionDto getPermission()
           
 RoleDto getRole()
           
 boolean isGranted()
          Check if the specified group permission is granted or revoked to the specified role
 void setGranted(boolean granted)
          Set whether the specified group permission is granted or revoked to the specified role
 void setGroup(GroupDto group)
           
 void setPermission(PermissionDto permission)
           
 void setRole(RoleDto role)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GroupRolePermissionDto

public GroupRolePermissionDto()

GroupRolePermissionDto

public GroupRolePermissionDto(GroupDto group,
                              RoleDto role,
                              PermissionDto permission,
                              boolean granted)

GroupRolePermissionDto

public GroupRolePermissionDto(GroupRolePermissionDto orig)
Method Detail

getGroup

public GroupDto getGroup()

setGroup

public void setGroup(GroupDto group)

getRole

public RoleDto getRole()

setRole

public void setRole(RoleDto role)

getPermission

public PermissionDto getPermission()

setPermission

public void setPermission(PermissionDto permission)

isGranted

public boolean isGranted()
Check if the specified group permission is granted or revoked to the specified role

Returns:
true if the group permission is granted to the role, false if the permission is revoked

setGranted

public void setGranted(boolean granted)
Set whether the specified group permission is granted or revoked to the specified role

Parameters:
granted - is true to grant the group permission to the role, false to revoke the permission

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

compareByGroup

public static int compareByGroup(GroupRolePermissionDto grp1,
                                 GroupRolePermissionDto grp2)
Compare two GroupRolePermissionDtos by group. Parameters may be null.

Parameters:
grp1 - is the first GroupRolePermissionDto, or null
grp2 - is the second GroupRolePermissionDto, or null
Returns:
a value < 0 if grp1 is less than grp2, a value > 0 if grp1 greater than grp2, and 0 if grp1 equals grp2

compareByRole

public static int compareByRole(GroupRolePermissionDto grp1,
                                GroupRolePermissionDto grp2)
Compare two GroupRolePermissionDtos by role. Parameters may be null.

Parameters:
grp1 - is the first GroupRolePermissionDto, or null
grp2 - is the second GroupRolePermissionDto, or null
Returns:
a value < 0 if grp1 is less than grp2, a value > 0 if grp1 greater than grp2, and 0 if grp1 equals grp2

compareByPermission

public static int compareByPermission(GroupRolePermissionDto grp1,
                                      GroupRolePermissionDto grp2)
Compare two GroupRolePermissionDtos by permission description. Parameters may be null.

Parameters:
grp1 - is the first GroupRolePermissionDto, or null
grp2 - is the second GroupRolePermissionDto, or null
Returns:
a value < 0 if grp1 is less than grp2, a value > 0 if grp1 greater than grp2, and 0 if grp1 equals grp2

CodeBeamer 5.4.0.1-RC API

Copyright © 2006-2009 Intland Software. All rights reserved.