The following lines contain the word 'select', 'insert', 'update' or 'delete':
select icx_regions_s.nextval
into l_region_id
from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_region_id,
MAIN_REGION,
REGION_NOT_SPLIT,
REGION_HORIZONTAL_PORTLETFLOW,
'Y',
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
select * into l_region
from icx_regions
where region_id = p_region_id;
select icx_regions_s.nextval into l_new_region_id from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_new_region_id,
l_region.region_id,
REGION_NOT_SPLIT,
l_region.portlet_flow,
l_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
update icx_page_plugs
set region_id = l_new_region_id
where region_id = p_region_id;
select icx_regions_s.nextval into l_new_region_id from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_new_region_id,
l_region.region_id,
REGION_NOT_SPLIT,
l_region.portlet_flow,
l_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
update icx_regions
set split_mode = p_split_mode
where region_id = l_region.region_id;
select * into l_parent_region
from icx_regions
where region_id = l_region.parent_region_id;
select icx_regions_s.nextval into l_new_region_id from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_new_region_id,
l_region.parent_region_id,
REGION_NOT_SPLIT,
l_region.portlet_flow,
l_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
select icx_regions_s.nextval into l_new_region_id from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_new_region_id,
p_region_id,
REGION_NOT_SPLIT,
l_region.portlet_flow,
l_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
update icx_page_plugs
set region_id = l_new_region_id
where region_id = p_region_id;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
icx_regions_s.nextval,
p_region_id,
REGION_NOT_SPLIT,
l_region.portlet_flow,
l_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
update icx_regions
set split_mode = REGION_HORIZONTAL_SPLIT
where region_id = p_region_id;
select icx_regions_s.nextval into l_new_region_id from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_new_region_id,
p_region_id,
REGION_NOT_SPLIT,
l_region.portlet_flow,
l_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
update icx_page_plugs
set region_id = l_new_region_id
where region_id = p_region_id;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
portlet_flow,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
icx_regions_s.nextval,
p_region_id,
REGION_NOT_SPLIT,
l_region.portlet_flow,
l_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
update icx_regions
set split_mode = REGION_VERTICAL_SPLIT
where region_id = p_region_id;
procedure delete_region (
p_region_id in integer
)
is
l_count number := 0;
select region_id
from icx_regions
where parent_region_id = p_region_id;
select parent_region_id
into l_parent_region_id
from icx_regions
where region_id = p_region_id;
delete from icx_page_plugs
where region_id = region_record.region_id;
delete from icx_regions
where parent_region_id = p_region_id;
delete from icx_page_plugs
where region_id = p_region_id;
select count(region_id)
into l_count
from icx_regions
where parent_region_id = l_parent_region_id;
delete from icx_regions
where region_id = p_region_id;
update icx_regions
set split_mode = REGION_NOT_SPLIT
where region_id = l_parent_region_id;
select split_mode, region_id
into l_split_mode, l_region_sibling_id
from icx_regions
where parent_region_id = l_parent_region_id
and region_id <> p_region_id;
delete from icx_regions
where parent_region_id = l_parent_region_id;
update icx_regions
set split_mode = REGION_NOT_SPLIT
where region_id = l_parent_region_id;
update icx_page_plugs
set region_id = l_parent_region_id
where region_id = l_region_sibling_id;
delete from icx_regions
where region_id = p_region_id;
delete from icx_regions
where region_id = p_region_id;
end delete_region;
select
region_id,
parent_region_id,
split_mode,
portlet_alignment,
height,
width,
width_restrict,
portlet_flow,
navwidget_id,
border
into
l_region.region_id,
l_region.parent_region_id,
l_region.split_mode,
l_region.portlet_alignment,
l_region.height,
l_region.width,
l_region.width_restrict,
l_region.portlet_flow,
l_region.navwidget_id,
l_region.border
from icx_regions
where region_id = p_region_id;
select icx_regions_s.nextval
into l_region_id
from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
width,
height,
portlet_alignment,
width_restrict,
portlet_flow,
navwidget_id,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_region_id,
p_region.parent_region_id,
p_region.split_mode,
p_region.width,
p_region.height,
p_region.portlet_alignment,
p_region.width_restrict,
p_region.portlet_flow,
p_region.navwidget_id,
p_region.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
update icx_regions
set parent_region_id = p_region.parent_region_id,
split_mode = p_region.split_mode,
width = p_region.width,
height = p_region.height,
portlet_alignment = p_region.portlet_alignment,
width_restrict = p_region.width_restrict,
portlet_flow = 0, -- we are not using p_region.portlet_flow,
navwidget_id = p_region.navwidget_id,
border = p_region.border
where region_id = p_region.region_id;
for x in (select * from icx_regions where parent_region_id = p_region_id) loop
l_index := l_index + 1;
procedure delete_regions (
p_layout_id in integer
)
is
l_count number := 0;
end delete_regions;
select *
from icx_page_plugs
where region_id = p_from_region_id;
select icx_page_plugs_s.nextval into l_plug_id from dual;
insert into ICX_PAGE_PLUGS
(PLUG_ID,
PAGE_ID,
DISPLAY_SEQUENCE,
RESPONSIBILITY_APPLICATION_ID,
SECURITY_GROUP_ID,
RESPONSIBILITY_ID,
MENU_ID,
ENTRY_SEQUENCE,
DISPLAY_NAME,
REGION_ID,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login)
values
(l_plug_id,
p_to_page_id,
thisplug.DISPLAY_SEQUENCE,
thisplug.RESPONSIBILITY_APPLICATION_ID,
thisplug.SECURITY_GROUP_ID,
thisplug.RESPONSIBILITY_ID,
thisplug.MENU_ID,
thisplug.ENTRY_SEQUENCE,
thisplug.DISPLAY_NAME,
p_to_region_id,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id);
for x in (select * from icx_regions where parent_region_id = p_from_region_id) loop
select * into l_region
from icx_regions
where region_id = p_to_region_id;
select icx_regions_s.nextval
into l_region_id
from sys.dual;
insert into icx_regions
(
region_id,
parent_region_id,
split_mode,
width,
height,
portlet_alignment,
width_restrict,
portlet_flow,
navwidget_id,
border,
last_update_date,
last_updated_by,
creation_date,
created_by,
last_update_login
)
values
(
l_region_id,
l_region.region_id,
x.split_mode,
x.width,
x.height,
x.portlet_alignment,
x.width_restrict,
x.portlet_flow,
x.navwidget_id,
x.border,
sysdate,
icx_sec.g_user_id,
sysdate,
icx_sec.g_user_id,
icx_sec.g_user_id
);
select
region_id,
parent_region_id,
split_mode,
portlet_alignment,
height,
width,
width_restrict,
portlet_flow,
navwidget_id,
border
into
l_region.region_id,
l_region.parent_region_id,
l_region.split_mode,
l_region.portlet_alignment,
l_region.height,
l_region.width,
l_region.width_restrict,
l_region.portlet_flow,
l_region.navwidget_id,
l_region.border
from icx_regions
where region_id = p_region_id;