DBA Data[Home] [Help]

APPS.PA_RELATIONSHIP_UTILS dependencies on PA_OBJECT_RELATIONSHIPS

Line 55: from pa_object_relationships

51: where element_version_id = c_element_version_id;
52:
53: cursor Is_linked(c_element_version_id NUMBER) IS
54: select '1'
55: from pa_object_relationships
56: where object_id_from1 = c_element_version_id
57: and object_type_from = 'PA_TASKS'
58: and relationship_type = 'L';
59:

Line 62: from pa_object_relationships

58: and relationship_type = 'L';
59:
60: cursor Is_structure(c_element_version_id NUMBER) IS
61: select '1'
62: from pa_object_relationships
63: where object_id_from1 = c_element_version_id
64: and object_type_from = 'PA_STRUCTURES';
65:
66: cursor Get_Struc_Ver_Id(c_element_version_id NUMBER) IS

Line 99: pa_object_relationships r

95: select '1'
96: from pa_proj_elements pe1,
97: pa_proj_element_versions pev1a,
98: pa_proj_element_versions pev1b,
99: pa_object_relationships r
100: where pev1a.element_version_id = c_elem_ver_from
101: and pev1a.proj_element_id = pe1.proj_element_id
102: and pe1.project_id = pev1b.project_id
103: and pe1.proj_element_id = pev1b.proj_element_id

Line 121: pa_object_relationships r

117: select '1'
118: from pa_proj_elements pe1,
119: pa_proj_element_versions pev1a,
120: pa_proj_element_versions pev1b,
121: pa_object_relationships r
122: where pev1a.element_version_id = c_elem_ver_from
123: and pev1a.proj_element_id = pe1.proj_element_id
124: and pe1.project_id = pev1b.project_id
125: and pe1.proj_element_id = pev1b.proj_element_id

Line 147: from pa_object_relationships

143: and a.proj_element_id = b.proj_element_id
144: and a.project_id = b.project_id
145: and b.element_version_id IN (
146: select object_id_to1
147: from pa_object_relationships
148: start with object_id_from1 IN (
149: select b.element_version_id
150: from pa_proj_element_versions a,
151: pa_proj_element_versions b

Line 168: from pa_object_relationships a

164:
165:
166: cursor Get_Top_Nodes(c_element_version_id NUMBER) IS
167: select a.object_id_from1
168: from pa_object_relationships a
169: where NOT EXISTS (select '1' from pa_object_relationships b
170: where b.object_id_to1 = a.object_id_from1)
171: start with a.object_id_to1 = c_element_version_id
172: and a.object_type_to IN ('PA_STRUCTURES','PA_TASKS')

Line 169: where NOT EXISTS (select '1' from pa_object_relationships b

165:
166: cursor Get_Top_Nodes(c_element_version_id NUMBER) IS
167: select a.object_id_from1
168: from pa_object_relationships a
169: where NOT EXISTS (select '1' from pa_object_relationships b
170: where b.object_id_to1 = a.object_id_from1)
171: start with a.object_id_to1 = c_element_version_id
172: and a.object_type_to IN ('PA_STRUCTURES','PA_TASKS')
173: connect by prior a.object_id_from1 = a.object_id_to1

Line 177: from pa_object_relationships a

173: connect by prior a.object_id_from1 = a.object_id_to1
174: and a.relationship_type IN ('S','L')
175: union
176: select a.object_id_from1
177: from pa_object_relationships a
178: where a.object_id_from1 = c_element_version_id
179: and object_type_from IN ('PA_STRUCTURES', 'PA_TASKS')
180: and relationship_type = 'S';
181: l_top_node_id NUMBER;

Line 185: from pa_object_relationships

181: l_top_node_id NUMBER;
182:
183: cursor Is_Version_Exist(c_top_node_id NUMBER, c_linking_node_id NUMBER) IS
184: select object_id_to1
185: from pa_object_relationships
186: where relationship_type IN ('S', 'L')
187: start with object_id_from1 = c_top_node_id
188: and object_type_from IN ('PA_STRUCTURES','PA_TASKS')
189: connect by object_id_from1 = prior object_id_to1

Line 202: from pa_object_relationships

198: and pev1b.proj_element_id = pe1.proj_element_id
199: and pev1a.proj_element_id = pe1.proj_element_id
200: and pev1a.element_version_id IN
201: ( select object_id_to1
202: from pa_object_relationships
203: where relationship_type IN ('S','L')
204: start with object_id_from1 = c_linking_node_id
205: and object_type_from IN ('PA_STRUCTURES','PA_TASKS')
206: connect by object_id_from1 = prior object_id_to1

Line 210: -- from pa_object_relationships

206: connect by object_id_from1 = prior object_id_to1
207: and relationship_type IN('L','S')
208: -- UNION
209: -- select object_id_from1
210: -- from pa_object_relationships
211: -- where relationship_type IN ('S','L')
212: -- start with object_id_to1 = c_linking_node_id
213: -- and object_type_to IN ('PA_STRUCTURES','PA_TASKS')
214: -- connect by prior object_id_from1 = object_id_to1

Line 539: ,pa_object_relationships por

535: SELECT 'Y'
536: FROM pa_proj_elements ppe
537: ,pa_proj_element_versions ppv1 /* to get link task version id */
538: ,pa_proj_element_versions ppv2 /* to get sub project structure version ids */
539: ,pa_object_relationships por
540: WHERE ppe.project_id = p_parent_project_id
541: AND ppe.link_task_flag = 'Y'
542: AND ppe.project_id = ppv1.project_id
543: AND ppe.proj_element_id = ppv1.proj_element_id

Line 595: -- of pa_object_relationships.

591: --e. You cannot create a dependency between objects that are in the same direct path from lowest
592: -- node to the top node.
593: --
594: -- Notes: The p_pre_<> paramaters are for predecessor tasks and stored in object_id_to1 colunmn
595: -- of pa_object_relationships.
596:
597: procedure check_create_intra_dep_ok(
598: p_pre_project_id IN NUMBER
599: ,p_pre_task_ver_id IN NUMBER

Line 610: FROM pa_object_relationships

606:
607: CURSOR cur_a
608: IS
609: SELECT 'x'
610: FROM pa_object_relationships
611: WHERE object_id_from1 = p_task_ver_id
612: AND object_id_from2 = p_project_id
613: AND object_id_to1 = p_pre_task_ver_id
614: AND object_id_to2 = p_pre_project_id

Line 623: FROM pa_object_relationships por2

619: IS
620: SELECT 'x'
621: FROM (
622: SELECT object_id_to1
623: FROM pa_object_relationships por2
624: WHERE relationship_type = 'D'
625: AND por2.object_id_from2 = por2.object_id_to2 --Bug 3629024
626: START WITH por2.object_id_from1 = p_pre_task_ver_id
627: AND relationship_type = 'D' --bug 3944567

Line 639: FROM pa_object_relationships por1

635: /*Commented out for bug 3629024
636: CURSOR cur_d
637: IS
638: SELECT 'x'
639: FROM pa_object_relationships por1
640: WHERE por1.relationship_type = 'D'
641: AND por1.object_id_to1 = p_task_ver_id
642: AND por1.object_id_from1 IN
643: ( SELECT por2.object_id_to1

Line 644: FROM pa_object_relationships por2

640: WHERE por1.relationship_type = 'D'
641: AND por1.object_id_to1 = p_task_ver_id
642: AND por1.object_id_from1 IN
643: ( SELECT por2.object_id_to1
644: FROM pa_object_relationships por2
645: START WITH por2.object_id_from1 = p_pre_task_ver_id
646: CONNECT BY por2.object_id_from1 = prior por2.object_id_to1
647: AND por2.relationship_type = prior por2.relationship_type
648: AND por2.relationship_type = 'S')

Line 654: FROM pa_object_relationships

650: */
651: CURSOR cur_e1_get_parent( c_child_task_ver_id NUMBER )
652: IS
653: SELECT object_id_from1
654: FROM pa_object_relationships
655: where object_id_to1 = c_child_task_ver_id
656: and relationship_type = 'S'
657: ;
658:

Line 862: -- of pa_object_relationships.

858: -- This check procedure check s the following business rules and returns status 'E' with proper
859: -- error message if any of the rules fails.
860: --a. No duplicates.
861: -- Notes: The p_pre_<> paramaters are for predecessor tasks and stored in object_id_to1 colunmn
862: -- of pa_object_relationships.
863:
864: procedure check_create_inter_dep_ok(
865: p_pre_project_id IN NUMBER
866: ,p_pre_task_ver_id IN NUMBER

Line 877: FROM pa_object_relationships

873:
874: CURSOR cur_a
875: IS
876: SELECT 'x'
877: FROM pa_object_relationships
878: WHERE object_id_from1 = p_task_ver_id
879: AND object_id_from2 = p_project_id
880: AND object_id_to1 = p_pre_task_ver_id
881: AND object_id_to2 = p_pre_project_id

Line 909: from pa_object_relationships por

905:
906: cursor cur_sub_proj_hierarchy(c_pre_project_id NUMBER) is
907: -- This query selects all the parent projects of the predecessor project.
908: select por.object_id_from1 task_ver_id, por.object_id_from2 project_id
909: from pa_object_relationships por
910: where por.relationship_type in ('LW', 'LF')
911: start with por.object_id_to2 = c_pre_project_id
912: connect by prior por.object_id_from2 = por.object_id_to2
913: and prior por.relationship_type = por.relationship_type

Line 920: from pa_object_relationships por

916: AND object_type_to = 'PA_STRUCTURES' --Bug 6429264
917: union all
918: -- This query selects all the child projects of the predecessor project.
919: select por.object_id_to1 task_ver_id, por.object_id_to2 project_id
920: from pa_object_relationships por
921: where por.relationship_type in ('LW', 'LF')
922: start with por.object_id_from2 = c_pre_project_id
923: connect by prior por.object_id_to2 = por.object_id_from2
924: and prior por.relationship_type = por.relationship_type

Line 934: from pa_object_relationships por

930: rec_sub_proj_hierarchy cur_sub_proj_hierarchy%ROWTYPE;
931:
932: cursor cur_linking_task(c_task_ver_id NUMBER, c_linking_task_ver_id NUMBER) is
933: select 'Y'
934: from pa_object_relationships por
935: where por.object_id_from1 = c_task_ver_id
936: and por.object_id_to1 = c_linking_task_ver_id
937: and por.relationship_type = 'S';
938:

Line 1079: FROM pa_object_relationships por

1075: pa_proj_elements ppe
1076: WHERE ppev.proj_element_id = ppe.proj_element_id
1077: and ppev.project_id = ppe.project_id
1078: AND ppev.element_version_id IN (SELECT object_id_to1
1079: FROM pa_object_relationships por
1080: WHERE por.object_id_from1 = c_element_version_id
1081: --Bug8534395: Commented below predicate to allow tasks from other project to be shown as predecessors.
1082: --AND por.object_id_from2 = por.object_id_to2
1083: AND por.object_type_from = 'PA_TASKS' --4141109 Replaced LIKE with Equijoin

Line 1116: SELECT 1 from pa_object_relationships

1112: FUNCTION ChecK_dep_exists(p_element_version_id IN NUMBER)
1113: RETURN VARCHAR2
1114: IS
1115: CURSOR get_dependency IS
1116: SELECT 1 from pa_object_relationships
1117: where relationship_type = 'D'
1118: and (object_id_from1 = p_element_version_id OR
1119: object_id_to1 = p_element_version_id);
1120: l_dummy NUMBER;

Line 1136: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.

1132:
1133: FUNCTION Is_Proj_Top_Program(p_project_id IN NUMBER)
1134: RETURN VARCHAR2
1135: IS
1136: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.
1137: /* CURSOR c1 IS
1138: select 1
1139: from pa_object_relationships
1140: where relationship_type IN ('LW', 'LF')

Line 1139: from pa_object_relationships

1135: IS
1136: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.
1137: /* CURSOR c1 IS
1138: select 1
1139: from pa_object_relationships
1140: where relationship_type IN ('LW', 'LF')
1141: and object_id_to2 = p_project_id;*/
1142: CURSOR c1 IS
1143: select 1

Line 1144: from pa_object_relationships por,

1140: where relationship_type IN ('LW', 'LF')
1141: and object_id_to2 = p_project_id;*/
1142: CURSOR c1 IS
1143: select 1
1144: from pa_object_relationships por,
1145: pa_proj_element_versions ppev
1146: where por.relationship_type IN ('LW', 'LF')
1147: and ppev.element_version_id = por.object_id_to1
1148: and por.object_id_to2 = ppev.project_id

Line 1155: from pa_object_relationships

1151: AND object_type_to = 'PA_STRUCTURES'; --Bug 6429264
1152:
1153: CURSOR c2 IS
1154: select 1
1155: from pa_object_relationships
1156: where relationship_type IN ('LW', 'LF')
1157: and object_id_from2 = p_project_id
1158: AND object_type_from = 'PA_TASKS' --Bug 6429264
1159: AND object_type_to = 'PA_STRUCTURES'; --Bug 6429264

Line 1185: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.

1181:
1182: FUNCTION Is_Proj_Sub_Project(p_project_id IN NUMBER)
1183: RETURN VARCHAR2
1184: IS
1185: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.
1186: /* CURSOR c1 IS
1187: select 1
1188: from pa_object_relationships
1189: where relationship_type IN ('LW', 'LF')

Line 1188: from pa_object_relationships

1184: IS
1185: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.
1186: /* CURSOR c1 IS
1187: select 1
1188: from pa_object_relationships
1189: where relationship_type IN ('LW', 'LF')
1190: and object_id_to2 = p_project_id;*/
1191: CURSOR c1 IS
1192: select 1

Line 1193: from pa_object_relationships por,

1189: where relationship_type IN ('LW', 'LF')
1190: and object_id_to2 = p_project_id;*/
1191: CURSOR c1 IS
1192: select 1
1193: from pa_object_relationships por,
1194: pa_proj_element_versions ppev
1195: where por.relationship_type IN ('LW', 'LF')
1196: and ppev.element_version_id = por.object_id_to1
1197: and por.object_id_to2 = ppev.project_id

Line 1220: from pa_object_relationships

1216: RETURN varchar2
1217: IS
1218: CURSOR c1 IS
1219: select 1
1220: from pa_object_relationships
1221: where relationship_type IN ('LW', 'LF')
1222: and object_id_from2 = p_project_id;
1223: l_dummy NUMBER;
1224: BEGIN

Line 1238: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.

1234:
1235: FUNCTION DISABLE_MULTI_PROG_OK(p_project_id NUMBER)
1236: RETURN varchar2
1237: IS
1238: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.
1239: /* CURSOR c1(c_parent_project_id NUMBER, c_child_project_id NUMBER) IS
1240: select count(1)
1241: from pa_object_relationships
1242: where relationship_type IN ('LW', 'LF')

Line 1241: from pa_object_relationships

1237: IS
1238: --Bug No 3634315 Performance Fix, to avoid full table scan on pa_object_relationships table.
1239: /* CURSOR c1(c_parent_project_id NUMBER, c_child_project_id NUMBER) IS
1240: select count(1)
1241: from pa_object_relationships
1242: where relationship_type IN ('LW', 'LF')
1243: and object_id_to2 = c_child_project_id
1244: and object_id_from1 <> c_parent_project_id;*/
1245: CURSOR c1(c_parent_project_id NUMBER, c_child_project_id NUMBER) IS

Line 1247: from pa_object_relationships por,

1243: and object_id_to2 = c_child_project_id
1244: and object_id_from1 <> c_parent_project_id;*/
1245: CURSOR c1(c_parent_project_id NUMBER, c_child_project_id NUMBER) IS
1246: select count(1)
1247: from pa_object_relationships por,
1248: pa_proj_element_versions ppev
1249: where relationship_type IN ('LW', 'LF')
1250: and ppev.element_version_id = object_id_to1
1251: and por.object_id_to2 = ppev.project_id

Line 1257: from pa_object_relationships

1253: and object_id_from2 <> c_parent_project_id;--bug 4244482
1254:
1255: CURSOR c2 IS
1256: select object_id_from2, object_Id_to2
1257: from pa_object_relationships
1258: where relationship_type IN ('LW') --bug 3962849
1259: start with object_id_from2 = p_project_id
1260: and relationship_type = 'LW'
1261: connect by prior object_id_to2 = object_id_from2

Line 1266: from pa_object_relationships

1262: and prior relationship_type = relationship_type;
1263:
1264: CURSOR c3 IS
1265: select object_id_from2, object_Id_to2
1266: from pa_object_relationships
1267: where relationship_type IN ('LF') --bug 3962849
1268: start with object_id_from2 = p_project_id
1269: and relationship_type = 'LF'
1270: connect by prior object_id_to2 = object_id_from2

Line 1321: from pa_object_relationships

1317: where element_version_id = c_element_version_id;
1318:
1319: CURSOR get_loop1(c_project_id NUMBER) IS
1320: select object_Id_to2, object_id_from2 -- Fix for Bug # 4297715.
1321: from pa_object_relationships
1322: where relationship_type IN ('LW')
1323: start with object_id_from2 = c_project_id
1324: connect by prior object_id_to2 = object_id_from2
1325: and prior relationship_type = relationship_type

Line 1330: from pa_object_relationships

1326: and relationship_type = 'LW';
1327:
1328: CURSOR get_loop2(c_project_id NUMBER) IS
1329: select object_Id_to2, object_id_from2 -- Fix for Bug # 4297715.
1330: from pa_object_relationships
1331: where relationship_type IN ('LF')
1332: start with object_id_from2 = c_project_id
1333: connect by prior object_id_to2 = object_id_from2
1334: and prior relationship_type = relationship_type

Line 1355: FROM pa_object_relationships

1351: AND ppe.object_type = 'PA_TASKS'
1352: AND ppe.project_id = ppa.project_id
1353: AND ppev.element_version_id IN (
1354: SELECT object_id_from1
1355: FROM pa_object_relationships
1356: WHERE relationship_type IN ('LW','LF')
1357: START WITH object_id_to2 = c_project_id
1358: AND object_type_to = 'PA_STRUCTURES'
1359: CONNECT BY object_id_from2 = prior object_id_to2

Line 1373: from pa_object_relationships a

1369: where project_id = c_project_id;
1370:
1371: CURSOR get_child_links(c_project_id NUMBER, c_parent_proj_id NUMBER) IS
1372: select distinct(object_id_from2)
1373: from pa_object_relationships a
1374: where a.relationship_type IN ('LW','LF')
1375: and a.object_id_to2 = c_project_id
1376: and a.object_id_from2 <> c_parent_proj_id -- Fix for Bug # 4297715.
1377: and exists (select 1 from PA_PROJ_ELEMENT_VERSIONS elv /* Added the exists for Bug 6148092 */

Line 1416: from pa_object_relationships por

1412:
1413: cursor cur_dep_hierarchy(c_src_task_ver_id NUMBER) is
1414: -- This query selects all the successor projects of the source project.
1415: select por.object_id_from2 project_id
1416: from pa_object_relationships por
1417: where por.relationship_type = 'D'
1418: start with por.object_id_to1 = c_src_task_ver_id
1419: -- connect by prior por.object_id_from2 = por.object_id_to2 -- Fix for Bug # 4256435.
1420: connect by prior por.object_id_from1 = por.object_id_to1 -- Fix for Bug # 4256435.

Line 1426: from pa_object_relationships por

1422: and por.relationship_type = 'D'
1423: union all
1424: -- This query selects all the predecessor projects of the source project.
1425: select por.object_id_to2 project_id
1426: from pa_object_relationships por
1427: where por.relationship_type = 'D'
1428: start with por.object_id_from1 = c_src_task_ver_id
1429: -- connect by prior por.object_id_to2 = por.object_id_from2 -- Fix for Bug # 4256435.
1430: connect by prior por.object_id_to1 = por.object_id_from1 -- Fix for Bug # 4256435.

Line 1646: from pa_object_relationships por1,

1642: RETURN NUMBER
1643: IS
1644: CURSOR c1 IS
1645: select por2.object_relationship_id, por2.relationship_type, ppev.element_version_id
1646: from pa_object_relationships por1,
1647: pa_object_relationships por2,
1648: pa_proj_element_versions ppev,
1649: pa_proj_elements ppe
1650: where ppe.proj_element_id = p_task_id

Line 1647: pa_object_relationships por2,

1643: IS
1644: CURSOR c1 IS
1645: select por2.object_relationship_id, por2.relationship_type, ppev.element_version_id
1646: from pa_object_relationships por1,
1647: pa_object_relationships por2,
1648: pa_proj_element_versions ppev,
1649: pa_proj_elements ppe
1650: where ppe.proj_element_id = p_task_id
1651: and ppe.proj_element_id = ppev.proj_element_id

Line 1663: from pa_object_relationships por1,

1659: order by ppev.element_version_id desc ; -- por2.relationship_type desc, -- Fix for Bug # 4477118.
1660:
1661: /*
1662: select por1.object_id_from1
1663: from pa_object_relationships por1,
1664: pa_object_relationships por2
1665: where por2.object_id_to1 = p_structure_ver_id
1666: and por2.object_id_from1 = por1.object_id_to1
1667: and por2.relationship_type IN ('LF', 'LW')

Line 1664: pa_object_relationships por2

1660:
1661: /*
1662: select por1.object_id_from1
1663: from pa_object_relationships por1,
1664: pa_object_relationships por2
1665: where por2.object_id_to1 = p_structure_ver_id
1666: and por2.object_id_from1 = por1.object_id_to1
1667: and por2.relationship_type IN ('LF', 'LW')
1668: and rownum < 2

Line 1690: from pa_object_relationships por1,

1686: RETURN NUMBER
1687: IS
1688: CURSOR c1 IS
1689: select por2.object_relationship_id, por2.relationship_type, ppev.element_version_id
1690: from pa_object_relationships por1,
1691: pa_object_relationships por2,
1692: pa_proj_element_versions ppev,
1693: pa_proj_elements ppe
1694: where ppe.proj_element_id = p_task_id

Line 1691: pa_object_relationships por2,

1687: IS
1688: CURSOR c1 IS
1689: select por2.object_relationship_id, por2.relationship_type, ppev.element_version_id
1690: from pa_object_relationships por1,
1691: pa_object_relationships por2,
1692: pa_proj_element_versions ppev,
1693: pa_proj_elements ppe
1694: where ppe.proj_element_id = p_task_id
1695: and ppe.proj_element_id = ppev.proj_element_id

Line 1721: from pa_object_relationships por1,

1717: RETURN NUMBER
1718: IS
1719: CURSOR c1 IS
1720: select por2.object_id_to1
1721: from pa_object_relationships por1,
1722: pa_object_relationships por2
1723: where por1.object_id_from1 = p_task_ver_id
1724: and por1.object_id_to1 = por2.object_id_from1
1725: and por2.relationship_type IN ('LF', 'LW')

Line 1722: pa_object_relationships por2

1718: IS
1719: CURSOR c1 IS
1720: select por2.object_id_to1
1721: from pa_object_relationships por1,
1722: pa_object_relationships por2
1723: where por1.object_id_from1 = p_task_ver_id
1724: and por1.object_id_to1 = por2.object_id_from1
1725: and por2.relationship_type IN ('LF', 'LW')
1726: and rownum < 2

Line 1772: FROM pa_object_relationships por1

1768: FUNCTION get_predecessors( p_src_task_ver_id IN NUMBER
1769: ,p_orig_succ_task_ver_id IN NUMBER ) RETURN BOOLEAN IS
1770: CURSOR cur_get_predecessors IS
1771: SELECT por1.object_id_to1 RELATED_TASK
1772: FROM pa_object_relationships por1
1773: WHERE por1.relationship_type = 'D'
1774: AND LEVEL = 1
1775: AND por1.object_id_from2 = por1.object_id_to2
1776: START WITH por1.object_id_from1 = p_src_task_ver_id

Line 1816: FROM pa_object_relationships por1

1812: FUNCTION get_parents_childs( p_src_task_ver_id IN NUMBER
1813: ,p_orig_succ_task_ver_id IN NUMBER ) RETURN BOOLEAN IS
1814: CURSOR cur_get_parents_childs IS
1815: SELECT por1.object_id_to1 RELATED_TASK
1816: FROM pa_object_relationships por1
1817: WHERE por1.relationship_type = 'S'
1818: AND por1.relationship_subtype = 'TASK_TO_TASK'
1819: START WITH por1.object_id_from1 = p_src_task_ver_id
1820: AND relationship_type = 'S' --bug 3944567

Line 1825: FROM pa_object_relationships por2

1821: CONNECT BY PRIOR por1.object_id_to1 = por1.object_id_from1
1822: AND PRIOR por1.relationship_type = por1.relationship_type
1823: UNION
1824: SELECT por2.object_id_from1 RELATED_TASK
1825: FROM pa_object_relationships por2
1826: WHERE por2.relationship_type = 'S'
1827: AND por2.relationship_subtype = 'TASK_TO_TASK'
1828: START WITH por2.object_id_to1 = p_src_task_ver_id
1829: AND relationship_type = 'S' --bug 3944567

Line 1840: from pa_object_relationships

1836:
1837: --bug 4145585
1838: Cursor check_intersect IS
1839: select object_id_from1 elem_ver_id
1840: from pa_object_relationships
1841: start with object_id_to1 = p_orig_succ_task_ver_id
1842: and relationship_type = 'D'
1843: connect by object_id_to1 = prior object_id_from1
1844: and relationship_type = prior relationship_type

Line 1848: from pa_object_relationships

1844: and relationship_type = prior relationship_type
1845: and object_id_to2 = object_id_from2
1846: INTERSECT
1847: select object_id_to1
1848: from pa_object_relationships
1849: start with object_id_to1 = p_src_task_ver_id
1850: and relationship_type = 'S'
1851: connect by prior object_id_to1 = object_id_from1
1852: and relationship_type = prior relationship_type;

Line 1887: Select count(1) from pa_object_relationships

1883: ,p_link_type VARCHAR2 DEFAULT 'SHARED' --bug 4532826
1884: ) return VARCHAR2
1885: IS
1886: CURSOR get_count IS
1887: Select count(1) from pa_object_relationships
1888: where relationship_type IN ('LW', 'LF')
1889: and (object_id_from2 = p_project_id or object_id_to2 = p_project_id);
1890:
1891: -- bug 4532826

Line 1893: Select count(1) from pa_object_relationships

1889: and (object_id_from2 = p_project_id or object_id_to2 = p_project_id);
1890:
1891: -- bug 4532826
1892: CURSOR get_count_fn IS
1893: Select count(1) from pa_object_relationships
1894: where relationship_type = 'LF'
1895: and (object_id_from2 = p_project_id or object_id_to2 = p_project_id);
1896:
1897: CURSOR get_count_wp IS

Line 1898: Select count(1) from pa_object_relationships

1894: where relationship_type = 'LF'
1895: and (object_id_from2 = p_project_id or object_id_to2 = p_project_id);
1896:
1897: CURSOR get_count_wp IS
1898: Select count(1) from pa_object_relationships
1899: where relationship_type = 'LW'
1900: and (object_id_from2 = p_project_id or object_id_to2 = p_project_id);
1901: --end bug 4532826
1902:

Line 1966: from pa_object_relationships

1962: ,p_task_ver_id IN NUMBER) RETURN VARCHAR2
1963: IS
1964: CURSOR get_parent_to_child IS
1965: select count(1)
1966: from pa_object_relationships
1967: where relationship_type = 'D'
1968: and object_id_from1 IN ( --get all tasks in upper branch
1969: select object_id_to1
1970: from pa_object_relationships

Line 1970: from pa_object_relationships

1966: from pa_object_relationships
1967: where relationship_type = 'D'
1968: and object_id_from1 IN ( --get all tasks in upper branch
1969: select object_id_to1
1970: from pa_object_relationships
1971: start with object_id_to1 = p_new_parent_task_ver_id
1972: and relationship_type = 'S'
1973: connect by prior object_id_from1 = object_id_to1
1974: and relationship_type = prior relationship_type

Line 1978: from pa_object_relationships

1974: and relationship_type = prior relationship_type
1975: and prior object_type_from = object_type_to)
1976: and object_id_to1 IN ( --get all tasks in lower branch
1977: select object_id_to1
1978: from pa_object_relationships
1979: start with object_id_to1 = p_task_ver_id
1980: and relationship_type = 'S'
1981: connect by prior object_id_to1 = object_id_from1
1982: and relationship_type = prior relationship_type

Line 1987: from pa_object_relationships

1983: and prior object_type_to = object_type_from);
1984:
1985: CURSOR get_child_to_parent IS
1986: select count(1)
1987: from pa_object_relationships
1988: where relationship_type = 'D'
1989: and object_id_from1 IN ( --get tasks in lower branch
1990: select object_id_to1
1991: from pa_object_relationships

Line 1991: from pa_object_relationships

1987: from pa_object_relationships
1988: where relationship_type = 'D'
1989: and object_id_from1 IN ( --get tasks in lower branch
1990: select object_id_to1
1991: from pa_object_relationships
1992: start with object_id_to1 = p_task_ver_id
1993: and relationship_type = 'S'
1994: connect by prior object_id_to1 = object_id_from1
1995: and relationship_type = prior relationship_type

Line 1999: from pa_object_relationships

1995: and relationship_type = prior relationship_type
1996: and prior object_type_to = object_type_from)
1997: and object_id_to1 IN ( --get tasks in upper branch
1998: select object_id_to1
1999: from pa_object_relationships
2000: start with object_id_to1 = p_new_parent_task_ver_id
2001: and relationship_type = 'S'
2002: connect by prior object_id_from1 = object_id_to1
2003: and relationship_type = prior relationship_type

Line 2108: from pa_proj_element_versions pev, pa_object_relationships por, pa_proj_elem_ver_structure ppevs

2104:
2105: select 1
2106: from dual
2107: where exists (select 1
2108: from pa_proj_element_versions pev, pa_object_relationships por, pa_proj_elem_ver_structure ppevs
2109: where pev.parent_structure_version_id = c_object_id_from
2110: and pev.element_version_id = por.object_id_from1
2111: and por.object_id_to1 = ppevs.element_version_id
2112: -- Bug Fix 5077552

Line 2124: from pa_object_relationships por

2120: -- Bug # 4737033.
2121:
2122: select ppevs.status_code status_code
2123: from (select por.object_id_to1
2124: from pa_object_relationships por
2125: where por.object_type_to = 'PA_STRUCTURES'
2126: and relationship_type in (c_relationship_type, 'S')
2127: start with por.object_id_from1 = c_object_id_from
2128: connect by prior por.object_id_to1 = por.object_id_from1

Line 2135: from pa_object_relationships por, pa_proj_elem_ver_structure ppevs

2131: where
2132: por.object_id_to1 = ppevs.element_version_id (+);
2133:
2134: select ppevs.status_code status_code
2135: from pa_object_relationships por, pa_proj_elem_ver_structure ppevs
2136: where por.object_id_to1 = ppevs.element_version_id (+)
2137: and por.object_type_to = 'PA_STRUCTURES'
2138: and relationship_type in (c_relationship_type, 'S')
2139: start with por.object_id_from1 = c_object_id_from

Line 2205: from pa_object_relationships por

2201: )RETURN VARCHAR2
2202: IS
2203: CURSOR check_parentproj_exists IS
2204: SELECT '1'
2205: from pa_object_relationships por
2206: WHERE p_structure_ver_id = por.object_id_to1
2207: and por.object_id_to2 = p_project_id
2208: and por.relationship_type IN ('LW', 'LF');
2209:

Line 2213: from pa_object_relationships por

2209:
2210:
2211: CURSOR check_parentproj_exists_wp IS
2212: SELECT '1'
2213: from pa_object_relationships por
2214: WHERE p_structure_ver_id = por.object_id_to1
2215: and por.object_id_to2 = p_project_id
2216: and por.relationship_type = 'LW';
2217:

Line 2220: from pa_object_relationships por

2216: and por.relationship_type = 'LW';
2217:
2218: CURSOR check_parentproj_exists_fn IS
2219: SELECT '1'
2220: from pa_object_relationships por
2221: WHERE p_structure_ver_id = por.object_id_to1
2222: and por.object_id_to2 = p_project_id
2223: and por.relationship_type = 'LF';
2224:

Line 2270: Select count(1) from pa_object_relationships

2266: ,p_link_type VARCHAR2 DEFAULT 'SHARED' --bug 4532826
2267: ) return VARCHAR2
2268: IS
2269: CURSOR get_count IS
2270: Select count(1) from pa_object_relationships
2271: where relationship_type IN ('LW', 'LF')
2272: and object_id_from2 = p_project_id;
2273:
2274: CURSOR get_count_fn IS

Line 2275: Select count(1) from pa_object_relationships

2271: where relationship_type IN ('LW', 'LF')
2272: and object_id_from2 = p_project_id;
2273:
2274: CURSOR get_count_fn IS
2275: Select count(1) from pa_object_relationships
2276: where relationship_type = 'LF'
2277: and object_id_from2 = p_project_id;
2278:
2279: CURSOR get_count_wp IS

Line 2280: Select count(1) from pa_object_relationships

2276: where relationship_type = 'LF'
2277: and object_id_from2 = p_project_id;
2278:
2279: CURSOR get_count_wp IS
2280: Select count(1) from pa_object_relationships
2281: where relationship_type = 'LW'
2282: and (object_id_from2 = p_project_id);
2283:
2284: