Class RBACDAO

  • All Implemented Interfaces:
    IRBACDAO

    public final class RBACDAO
    extends java.lang.Object
    implements IRBACDAO
    This class provides Data Access methods for RBAC objects
    • Constructor Summary

      Constructors 
      Constructor Description
      RBACDAO()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void delete​(int nRBACId)
      Delete a record from the table
      void deleteForResourceTypeAndId​(java.lang.String strResourceType, java.lang.String strResourceId)
      Remove all the entries of the given ressource type and ressource id
      void deleteForRoleKey​(java.lang.String strRoleKey)
      Remove all the entries of the given role key
      void insert​(RBAC rBAC)
      Insert a new record in the table.
      RBAC load​(int nRBACId)
      Load the data of RBAC from the table
      java.util.Collection<RBAC> selectByPermissionsAndRoles​(java.util.Collection<java.lang.String> permissions, java.util.Collection<java.lang.String> roles)
      Find all entries for a given collection of permissions and roles
      java.util.Collection<RBAC> selectRBACList()
      Load the list of rBACs
      java.util.Collection<RBAC> selectRBACListByRoleKey​(java.lang.String strRoleKey)
      Find all the entries for a given role key
      java.util.Collection<java.lang.String> selectRoleKeys​(java.lang.String strTypeCode, java.lang.String strId, java.lang.String strPermission)  
      void store​(RBAC rBAC)
      Update the record in the table
      void updateRoleKey​(java.lang.String strOldRoleKey, java.lang.String strNewRoleKey)
      Update the role key of all the entries of a given role key
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RBACDAO

        public RBACDAO()
    • Method Detail

      • insert

        public void insert​(RBAC rBAC)
        Insert a new record in the table.
        Specified by:
        insert in interface IRBACDAO
        Parameters:
        rBAC - The rBAC object
      • load

        public RBAC load​(int nRBACId)
        Load the data of RBAC from the table
        Specified by:
        load in interface IRBACDAO
        Parameters:
        nRBACId - The identifier of RBAC
        Returns:
        the instance of the RBAC
      • delete

        public void delete​(int nRBACId)
        Delete a record from the table
        Specified by:
        delete in interface IRBACDAO
        Parameters:
        nRBACId - The id of RBAC object to delete
      • store

        public void store​(RBAC rBAC)
        Update the record in the table
        Specified by:
        store in interface IRBACDAO
        Parameters:
        rBAC - The reference of rBAC
      • selectRBACList

        public java.util.Collection<RBAC> selectRBACList()
        Load the list of rBACs
        Specified by:
        selectRBACList in interface IRBACDAO
        Returns:
        The Collection of the RBACs
      • selectRBACListByRoleKey

        public java.util.Collection<RBAC> selectRBACListByRoleKey​(java.lang.String strRoleKey)
        Find all the entries for a given role key
        Specified by:
        selectRBACListByRoleKey in interface IRBACDAO
        Parameters:
        strRoleKey - the role key to search for
        Returns:
        A collection of rBACs
      • selectByPermissionsAndRoles

        public java.util.Collection<RBAC> selectByPermissionsAndRoles​(java.util.Collection<java.lang.String> permissions,
                                                                      java.util.Collection<java.lang.String> roles)
        Description copied from interface: IRBACDAO
        Find all entries for a given collection of permissions and roles
        Specified by:
        selectByPermissionsAndRoles in interface IRBACDAO
        Parameters:
        permissions - the permissions collection
        roles - the roles collection
        Returns:
        A collection of RBACs
      • updateRoleKey

        public void updateRoleKey​(java.lang.String strOldRoleKey,
                                  java.lang.String strNewRoleKey)
        Update the role key of all the entries of a given role key
        Specified by:
        updateRoleKey in interface IRBACDAO
        Parameters:
        strOldRoleKey - the role key to update
        strNewRoleKey - the new role key
      • deleteForRoleKey

        public void deleteForRoleKey​(java.lang.String strRoleKey)
        Remove all the entries of the given role key
        Specified by:
        deleteForRoleKey in interface IRBACDAO
        Parameters:
        strRoleKey - the role key of the entries to remove
      • selectRoleKeys

        public java.util.Collection<java.lang.String> selectRoleKeys​(java.lang.String strTypeCode,
                                                                     java.lang.String strId,
                                                                     java.lang.String strPermission)
        Specified by:
        selectRoleKeys in interface IRBACDAO
        Parameters:
        strTypeCode - The type code
        strId - the id
        strPermission - th permission
        Returns:
        listRoleKeys
      • deleteForResourceTypeAndId

        public void deleteForResourceTypeAndId​(java.lang.String strResourceType,
                                               java.lang.String strResourceId)
        Remove all the entries of the given ressource type and ressource id
        Specified by:
        deleteForResourceTypeAndId in interface IRBACDAO
        Parameters:
        strResourceType - the resource type
        strResourceId - the resource id