postgresql7.1
select portal__new(
null,
:name,
:theme_id,
:layout_id,
:template_id,
:default_page_name,
:default_accesskey,
'portal',
now(),
null,
null,
:context_id
);
select portal__delete(:portal_id);
insert into portal_element_parameters
(parameter_id, element_id, config_required_p, configured_p, key, value)
select nextval('t_acs_object_id_seq'), :new_element_id, config_required_p, configured_p, key, value
from portal_element_parameters
where element_id = :template_element_id
insert into portal_element_parameters
(parameter_id, element_id, config_required_p, configured_p, key, value)
select nextval('t_acs_object_id_seq'), :new_element_id, config_required_p, configured_p, key, value
from portal_datasource_def_params where datasource_id= :ds_id
insert into portal_element_parameters
(parameter_id, element_id, configured_p, key, value)
select nextval('t_acs_object_id_seq'), :element_id, 't', :key, :value
from dual
where not exists (select parameter_id
from portal_element_parameters
where element_id = :element_id
and key = :key
and value= :value)
select portal_page__new(
null,
:pretty_name,
:accesskey,
:portal_id,
:layout_id,
'f',
'portal_page',
now(),
null,
null,
null
);
select portal_page__delete(:page_id);