[Home] [Help]
29:
30: -- Copying data with previous set id to new set_id.
31: for rec_link in l_link_csr loop
32: -- dtian: use table handler instead
33: select cs_kb_set_links_s.nextval into l_id from dual;
34:
35: CS_KB_SET_LINKS_PKG.Insert_Row(
36: X_Rowid => l_rowid,
37: X_Link_Id => l_id,
270: -- End of Validation
271:
272: --prepare data, then insert new set link
273: IF( x_link_id is null ) THEN
274: select cs_kb_set_links_s.nextval into l_id from dual;
275: ELSE
276: l_id := x_link_id;
277: END IF;
278: --Start of Bugfix8513725
379: End ;
380: --End Of Bugfix8513725
381:
382: IF ( l_links_to_soln_ver_ct = 0 ) THEN
383: select cs_kb_set_links_s.nextval into l_other_link_id from dual;
384: CS_KB_SET_LINKS_PKG.Insert_Row(
385: X_Rowid => l_other_rowid,
386: X_Link_Id => l_other_link_id,
387: X_Link_type => p_link_type,
707:
708: -- Validation Cursors
709: CURSOR Validate_Link IS
710: SELECT sl.set_id, sl.object_code, sl.other_id, sb.set_number, sb.status
711: FROM CS_KB_SET_LINKS sl, CS_KB_SETS_B sb
712: WHERE sl.link_id = P_LINK_ID
713: AND sl.set_id = sb.set_id
714: AND ( sb.status = 'PUB' OR sb.latest_version_flag = 'Y' );
715:
716: -- Cursor to fetch link to latest in-progress version of a solution
717: CURSOR Get_Link_To_Latest_Ver(c_soln_number VARCHAR2, c_object_code VARCHAR2,
718: c_other_id NUMBER) IS
719: SELECT sl.link_id, sl.set_id
720: FROM CS_KB_SET_LINKS sl, CS_KB_SETS_B sb
721: WHERE sb.set_number = c_soln_number
722: AND sb.latest_version_flag = 'Y'
723: AND sb.set_id = sl.set_id
724: AND sl.object_code = c_object_code
727: -- Cursor to fetch link to published version of a solution
728: CURSOR Get_Link_To_Published_Ver(c_soln_number VARCHAR2, c_object_code VARCHAR2,
729: c_other_id NUMBER) IS
730: SELECT sl.link_id, sl.set_id
731: FROM CS_KB_SET_LINKS sl, CS_KB_SETS_B sb
732: WHERE sb.set_number = c_soln_number
733: AND sb.status = 'PUB'
734: AND sb.set_id = sl.set_id
735: AND sl.object_code = c_object_code
1025: -- Cursor to validate link exists and is to either a published solution
1026: -- version or an in-progress version.
1027: cursor Valid_Link IS
1028: select sb.set_number, sb.status, sl.object_code, sl.other_id
1029: from cs_kb_set_links sl, cs_kb_sets_b sb
1030: where sl.link_id = P_LINK_ID
1031: and sl.set_id = sb.set_id
1032: and ( sb.status = 'PUB' or sb.latest_version_flag = 'Y' );
1033:
1034: -- Cursor to fetch link to latest in-progress version of a solution
1035: CURSOR Get_Link_To_Other_Ver(c_soln_number VARCHAR2, c_object_code VARCHAR2,
1036: c_other_id NUMBER) IS
1037: SELECT sl.link_id
1038: FROM CS_KB_SET_LINKS sl, CS_KB_SETS_B sb
1039: WHERE sb.set_number = c_soln_number
1040: AND (sb.latest_version_flag = 'Y' or sb.status = 'PUB')
1041: AND sb.set_id = sl.set_id
1042: AND sl.object_code = c_object_code
1250: ) IS
1251:
1252: BEGIN
1253:
1254: update CS_KB_SET_LINKS set
1255:
1256: LINK_TYPE = X_LINK_TYPE,
1257: OBJECT_CODE = X_OBJECT_CODE,
1258: SET_ID = X_SET_ID,