-- Wrapper package for accesing to cms_groups table.
create or replace package body cms_group as
-- Adds a new group to the CMS group
-- Parameters:
-- p_groupName: group name used for identification for example User Group
-- Returns:
-- g_id (number) the group id
function addGroup(p_groupName varchar2) return number is
v_g_id number;
begin
select cms_groups_seq.nextval into v_g_id from dual;
insert into cms_groups values (v_g_id,p_groupName);
return v_g_id;
end addGroup;
-- Removes a group from the CMS group list
-- Parameters:
-- p_g_id: group id to remove
-- raise NO_DATA_FOUND exception if the user doesn t exists
procedure remove(p_g_id number) is
begin
delete from cms_groups where g_id=p_g_id;
end remove;