The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT p_event_name ||'-'|| jtf_rs_wf_event_guid_s.nextval INTO l_key FROM DUAL;
l_list.DELETE;
l_list.DELETE;
PROCEDURE update_resource
(P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2,
P_COMMIT IN VARCHAR2,
P_RESOURCE_REC IN jtf_rs_resource_pvt.RESOURCE_REC_TYPE,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2
) IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_RESOURCE';
select user_id,
resource_name,
trunc(start_date_active) start_date_active,
trunc(end_date_active) end_date_active,
time_zone,
cost_per_hr,
primary_language,
secondary_language,
ies_agent_login,
server_group_id,
assigned_to_group_id,
cost_center,
charge_to_cost_center,
compensation_currency_code,
commissionable_flag,
hold_reason_code,
hold_payment,
comp_service_team_id,
support_site_id
from jtf_rs_resource_extns_vl
where resource_id = p_resource_rec.resource_id;
/* If user is changed, raise the event oracle.apps.jtf.jres.resource.update.user */
if (nvl(res_rec.user_id,-9999) <> nvl(l_new_user_id,-9999)) then
l_event_name := 'oracle.apps.jtf.jres.resource.update.user';
l_list.DELETE;
/* If date effectivity is changed, raise the event oracle.apps.jtf.jres.resource.update.effectivedate */
if (((res_rec.end_date_active is NULL) AND (l_new_end_date_active is NOT NULL)) OR
((res_rec.end_date_active is NOT NULL) AND (l_new_end_date_active is NULL)) OR
(res_rec.end_date_active <> l_new_end_date_active) OR
(res_rec.start_date_active <> l_new_start_date_active)
) then
l_event_name := 'oracle.apps.jtf.jres.resource.update.effectivedate';
l_list.DELETE;
raise the event oracle.apps.jtf.jres.resource.update.attributes */
if (((res_rec.resource_name is NULL) AND (l_new_resource_name is NOT NULL)) OR
((res_rec.resource_name is NOT NULL) AND (l_new_resource_name is NULL)) OR
(res_rec.resource_name <> l_new_resource_name) OR
((res_rec.time_zone is NULL) AND (l_new_time_zone is NOT NULL)) OR
((res_rec.time_zone is NOT NULL) AND (l_new_time_zone is NULL)) OR
(res_rec.time_zone <> l_new_time_zone) OR
((res_rec.cost_per_hr is NULL) AND (l_new_cost_per_hr is NOT NULL)) OR
((res_rec.cost_per_hr is NOT NULL) AND (l_new_cost_per_hr is NULL)) OR
(res_rec.cost_per_hr <> l_new_cost_per_hr) OR
((res_rec.primary_language is NULL) AND (l_new_primary_language is NOT NULL)) OR
((res_rec.primary_language is NOT NULL) AND (l_new_primary_language is NULL)) OR
(res_rec.primary_language <> l_new_primary_language) OR
((res_rec.secondary_language is NULL) AND (l_new_secondary_language is NOT NULL)) OR
((res_rec.secondary_language is NOT NULL) AND (l_new_secondary_language is NULL)) OR
(res_rec.secondary_language <> l_new_secondary_language) OR
((res_rec.ies_agent_login is NULL) AND (l_new_ies_agent_login is NOT NULL)) OR
((res_rec.ies_agent_login is NOT NULL) AND (l_new_ies_agent_login is NULL)) OR
(res_rec.ies_agent_login <> l_new_ies_agent_login) OR
((res_rec.server_group_id is NULL) AND (l_new_server_group_id is NOT NULL)) OR
((res_rec.server_group_id is NOT NULL) AND (l_new_server_group_id is NULL)) OR
(res_rec.server_group_id <> l_new_server_group_id) OR
((res_rec.assigned_to_group_id is NULL) AND (l_new_assigned_to_group_id is NOT NULL)) OR
((res_rec.assigned_to_group_id is NOT NULL) AND (l_new_assigned_to_group_id is NULL)) OR
(res_rec.assigned_to_group_id <> l_new_assigned_to_group_id) OR
((res_rec.cost_center is NULL) AND (l_new_cost_center is NOT NULL)) OR
((res_rec.cost_center is NOT NULL) AND (l_new_cost_center is NULL)) OR
(res_rec.cost_center <> l_new_cost_center) OR
((res_rec.charge_to_cost_center is NULL) AND (l_new_charge_to_cost_center is NOT NULL)) OR
((res_rec.charge_to_cost_center is NOT NULL) AND (l_new_charge_to_cost_center is NULL)) OR
(res_rec.charge_to_cost_center <> l_new_charge_to_cost_center) OR
((res_rec.compensation_currency_code is NULL) AND (l_new_comp_currency_code is NOT NULL)) OR
((res_rec.compensation_currency_code is NOT NULL) AND (l_new_comp_currency_code is NULL)) OR
(res_rec.compensation_currency_code <> l_new_comp_currency_code) OR
((res_rec.commissionable_flag is NULL) AND (l_new_commissionable_flag is NOT NULL)) OR
((res_rec.commissionable_flag is NOT NULL) AND (l_new_commissionable_flag is NULL)) OR
(res_rec.commissionable_flag <> l_new_commissionable_flag) OR
((res_rec.hold_reason_code is NULL) AND (l_new_hold_reason_code is NOT NULL)) OR
((res_rec.hold_reason_code is NOT NULL) AND (l_new_hold_reason_code is NULL)) OR
(res_rec.hold_reason_code <> l_new_hold_reason_code) OR
((res_rec.hold_payment is NULL) AND (l_new_hold_payment is NOT NULL)) OR
((res_rec.hold_payment is NOT NULL) AND (l_new_hold_payment is NULL)) OR
(res_rec.hold_payment <> l_new_hold_payment) OR
((res_rec.comp_service_team_id is NULL) AND (l_new_comp_service_team_id is NOT NULL)) OR
((res_rec.comp_service_team_id is NOT NULL) AND (l_new_comp_service_team_id is NULL)) OR
(res_rec.comp_service_team_id <> l_new_comp_service_team_id) OR
((res_rec.support_site_id is NULL) AND (l_new_support_site_id is NOT NULL)) OR
((res_rec.support_site_id is NOT NULL) AND (l_new_support_site_id is NULL)) OR
(res_rec.support_site_id <> l_new_support_site_id)
) then
l_event_name := 'oracle.apps.jtf.jres.resource.update.attributes';
l_list.DELETE;
END update_resource;
PROCEDURE delete_resource
(P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2,
P_COMMIT IN VARCHAR2,
P_RESOURCE_ID IN NUMBER,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2
) IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'DELETE_RESOURCE';
l_event_name varchar2(240) := 'oracle.apps.jtf.jres.resource.delete';
l_list.DELETE;
END delete_resource;
l_list.DELETE;
PROCEDURE update_resource_role
(P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2,
P_COMMIT IN VARCHAR2,
P_RESOURCE_ROLE_REC IN jtf_rs_roles_pvt.RESOURCE_ROLE_REC_TYPE,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2
) IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_RESOURCE_ROLE';
l_event_name varchar2(240) := 'oracle.apps.jtf.jres.role.update';
select
role_id,
role_type_code,
role_code,
role_name,
role_desc,
active_flag,
member_flag,
admin_flag,
lead_flag,
manager_flag
from jtf_rs_roles_vl
where role_id = p_resource_role_rec.role_id;
/* If any of the following attributes changes, raise the event oracle.apps.jtf.jres.role.update */
if ((res_role_rec.role_type_code <> l_new_role_type_code) OR
(res_role_rec.role_code <> l_new_role_code) OR
(res_role_rec.role_name <> l_new_role_name) OR
((res_role_rec.role_desc is NULL) AND (l_new_role_desc is NOT NULL)) OR
((res_role_rec.role_desc is NOT NULL) AND (l_new_role_desc is NULL)) OR
(res_role_rec.role_desc <> l_new_role_desc) OR
(res_role_rec.active_flag <> l_new_active_flag) OR
(nvl(res_role_rec.member_flag,'X') <> nvl(l_new_member_flag,'X')) OR
(nvl(res_role_rec.admin_flag,'X') <> nvl(l_new_admin_flag,'X')) OR
(nvl(res_role_rec.lead_flag,'X') <> nvl(l_new_lead_flag,'X')) OR
(nvl(res_role_rec.manager_flag,'X') <> nvl(l_new_manager_flag,'X'))
) then
--Get the item key
l_key := item_key(l_event_name);
l_list.DELETE;
END update_resource_role;
PROCEDURE delete_resource_role
(P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2,
P_COMMIT IN VARCHAR2,
P_ROLE_ID IN NUMBER,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2
) IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'DELETE_RESOURCE_ROLE';
l_event_name varchar2(240) := 'oracle.apps.jtf.jres.role.delete';
l_list.DELETE;
END delete_resource_role;
l_list.DELETE;
PROCEDURE update_resource_role_relate
(P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2,
P_COMMIT IN VARCHAR2,
P_ROLE_RELATE_ID IN NUMBER,
P_ROLE_RESOURCE_TYPE IN VARCHAR2,
P_ROLE_RESOURCE_ID IN NUMBER,
P_ROLE_ID IN NUMBER,
P_START_DATE_ACTIVE IN DATE,
P_END_DATE_ACTIVE IN DATE,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2
) IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_RESOURCE_ROLE_RELATE';
l_event_name varchar2(240) := 'oracle.apps.jtf.jres.rolerelate.update';
select trunc(start_date_active) start_date_active,
trunc(end_date_active) end_date_active
from jtf_rs_role_relations
where role_relate_id = p_role_relate_id;
/* If any of the following attributes changes, raise the event oracle.apps.jtf.jres.rolerelate.update */
if (((res_rolerelate_rec.end_date_active is NULL) AND (l_new_end_date_active is NOT NULL)) OR
((res_rolerelate_rec.end_date_active is NOT NULL) AND (l_new_end_date_active is NULL)) OR
(res_rolerelate_rec.end_date_active <> l_new_end_date_active) OR
(res_rolerelate_rec.start_date_active <> l_new_start_date_active)
) then
--Get the item key
l_key := item_key(l_event_name);
l_list.DELETE;
END update_resource_role_relate;
PROCEDURE delete_resource_role_relate
(P_API_VERSION IN NUMBER,
P_INIT_MSG_LIST IN VARCHAR2,
P_COMMIT IN VARCHAR2,
P_ROLE_RELATE_ID IN NUMBER,
X_RETURN_STATUS OUT NOCOPY VARCHAR2,
X_MSG_COUNT OUT NOCOPY NUMBER,
X_MSG_DATA OUT NOCOPY VARCHAR2
) IS
l_api_version CONSTANT NUMBER := 1.0;
l_api_name CONSTANT VARCHAR2(30) := 'DELETE_RESOURCE_ROLE_RELATE';
l_event_name varchar2(240) := 'oracle.apps.jtf.jres.rolerelate.delete';
select role_resource_type,
role_resource_id,
role_id
from jtf_rs_role_relations
where role_relate_id = p_role_relate_id
and nvl(delete_flag,'N') = 'Y';
l_list.DELETE;
END delete_resource_role_relate;