Package com.axelor.auth.db
Class Role
- java.lang.Object
-
- com.axelor.db.Model
-
- com.axelor.auth.db.AuditableModel
-
- com.axelor.auth.db.Role
-
@Entity public class Role extends AuditableModel
This object stores the roles.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMenu(MetaMenu item)
Add the givenMetaMenu
item to themenus
collection.void
addMetaPermission(MetaPermission item)
Add the givenMetaPermission
item to themetaPermissions
collection.void
addPermission(Permission item)
Add the givenPermission
item to thepermissions
collection.void
clearMenus()
Clear themenus
collection.void
clearMetaPermissions()
Clear themetaPermissions
collection.void
clearPermissions()
Clear thepermissions
collection.boolean
equals(Object obj)
String
getDescription()
Long
getId()
Set<MetaMenu>
getMenus()
Set<MetaPermission>
getMetaPermissions()
String
getName()
Set<Permission>
getPermissions()
int
hashCode()
void
removeMenu(MetaMenu item)
Remove the givenMetaMenu
item from themenus
collection.void
removeMetaPermission(MetaPermission item)
Remove the givenMetaPermission
item from themetaPermissions
collection.void
removePermission(Permission item)
Remove the givenPermission
item from thepermissions
collection.void
setDescription(String description)
void
setId(Long id)
void
setMenus(Set<MetaMenu> menus)
void
setMetaPermissions(Set<MetaPermission> metaPermissions)
void
setName(String name)
void
setPermissions(Set<Permission> permissions)
String
toString()
-
Methods inherited from class com.axelor.auth.db.AuditableModel
getCreatedBy, getCreatedOn, getUpdatedBy, getUpdatedOn
-
Methods inherited from class com.axelor.db.Model
getArchived, getVersion, isSelected, setArchived, setSelected, setVersion
-
-
-
-
Constructor Detail
-
Role
public Role()
-
Role
public Role(String name)
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
getDescription
public String getDescription()
-
setDescription
public void setDescription(String description)
-
addMenu
public void addMenu(MetaMenu item)
Add the givenMetaMenu
item to themenus
collection.- Parameters:
item
- the item to add
-
removeMenu
public void removeMenu(MetaMenu item)
Remove the givenMetaMenu
item from themenus
collection.- Parameters:
item
- the item to remove
-
clearMenus
public void clearMenus()
Clear themenus
collection.
-
getPermissions
public Set<Permission> getPermissions()
-
setPermissions
public void setPermissions(Set<Permission> permissions)
-
addPermission
public void addPermission(Permission item)
Add the givenPermission
item to thepermissions
collection.- Parameters:
item
- the item to add
-
removePermission
public void removePermission(Permission item)
Remove the givenPermission
item from thepermissions
collection.- Parameters:
item
- the item to remove
-
clearPermissions
public void clearPermissions()
Clear thepermissions
collection.
-
getMetaPermissions
public Set<MetaPermission> getMetaPermissions()
-
setMetaPermissions
public void setMetaPermissions(Set<MetaPermission> metaPermissions)
-
addMetaPermission
public void addMetaPermission(MetaPermission item)
Add the givenMetaPermission
item to themetaPermissions
collection.- Parameters:
item
- the item to add
-
removeMetaPermission
public void removeMetaPermission(MetaPermission item)
Remove the givenMetaPermission
item from themetaPermissions
collection.- Parameters:
item
- the item to remove
-
clearMetaPermissions
public void clearMetaPermissions()
Clear themetaPermissions
collection.
-
-