class SecurityRoleFunctionServiceImpl implements SecurityRoleFunctionService {

    @Override
    public SecurityRoleFunction deleteSecurityRoleFunction(SecurityRoleFunctionKey securityRoleFunctionKey)
    {
        // Validate and trim the security role to function mapping key.
        securityRoleFunctionHelper.validateAndTrimSecurityRoleFunctionKey(securityRoleFunctionKey);

        // Retrieve and ensure that a security role to function mapping with the specified key exists.
        SecurityRoleFunctionEntity securityRoleFunctionEntity = securityRoleFunctionDaoHelper.getSecurityRoleFunctionEntity(securityRoleFunctionKey);

        // Delete this security role to function mapping.
        securityRoleFunctionDao.delete(securityRoleFunctionEntity);

        // Create a security role to function mapping object from the deleted entity and return it.
        return createSecurityRoleFunctionFromEntity(securityRoleFunctionEntity);
    }

}