Class RoleHome


  • public final class RoleHome
    extends Object
    This class provides instances management methods (create, find, ...) for Role right objects
    • Method Detail

      • create

        public static Role create​(Role role)
        Creation of an instance of a mode
        Parameters:
        role - An instance of a role which contains the informations to create
        Returns:
        The instance of a mode which has been created with its primary key.
      • update

        public static Role update​(Role role)
        Update of the mode which is specified
        Parameters:
        role - The instance of the role which contains the data to store
        Returns:
        The instance of the mode which has been updated
      • remove

        public static void remove​(String strRole)
        Remove the mode whose identifier is specified in parameter
        Parameters:
        strRole - The identifier of the role to remove
      • findByPrimaryKey

        public static Role findByPrimaryKey​(String strRole)
        Returns an instance of an role whose identifier is specified in parameter
        Parameters:
        strRole - The mode primary key
        Returns:
        an instance of a role
      • getRolesList

        public static ReferenceList getRolesList()
        Return the list of all roles
        Returns:
        A ReferenceList of roles
      • findAll

        public static Collection<Role> findAll()
        Returns the roles list
        Returns:
        Collection of Role
      • findExistRole

        public static boolean findExistRole​(String strRole)
        Test if the role exists
        Parameters:
        strRole - The role name
        Returns:
        true if the role exists, otherwise false
      • getRolesList

        public static ReferenceList getRolesList​(AdminUser user)
        Return the list of all roles
        Parameters:
        user - The Admin User
        Returns:
        A ReferenceList of roles