[Home] [Help]
607: -- The following cursor determines the ovn of the master attribute id
608: --
609: Cursor csr_master_attribute is
610: Select tca.object_version_number
611: From pqh_txn_category_attributes tca
612: Where txn_category_attribute_id = p_txn_category_attribute_id
613: for update nowait;
614: --
615: -- The foll cursor selects the txn_category_attribute_id of all the child
616: -- attributes of the passed master attribute
617: --
618: Cursor csr_child_attributes is
619: Select tca.txn_category_attribute_id,tca.object_version_number
620: From pqh_txn_category_attributes tca
621: Where tca.transaction_category_id = p_transaction_category_id
622: and tca.attribute_id in
623: (Select attribute_id
624: From pqh_attributes
624: From pqh_attributes
625: Where master_attribute_id = p_attribute_id)
626: for update nowait;
627: --
628: l_ovn pqh_txn_category_attributes.object_version_number%type;
629: --
630: l_child_id pqh_txn_category_attributes.txn_category_attribute_id%type;
631: l_child_ovn pqh_txn_category_attributes.object_version_number%type;
632: --
626: for update nowait;
627: --
628: l_ovn pqh_txn_category_attributes.object_version_number%type;
629: --
630: l_child_id pqh_txn_category_attributes.txn_category_attribute_id%type;
631: l_child_ovn pqh_txn_category_attributes.object_version_number%type;
632: --
633: l_proc varchar2(72) := 'select_routing_attribute';
634: --
627: --
628: l_ovn pqh_txn_category_attributes.object_version_number%type;
629: --
630: l_child_id pqh_txn_category_attributes.txn_category_attribute_id%type;
631: l_child_ovn pqh_txn_category_attributes.object_version_number%type;
632: --
633: l_proc varchar2(72) := 'select_routing_attribute';
634: --
635: Begin
705: -- attributes of the selected master attribute
706: --
707: Cursor csr_child_attributes(p_master_attribute in number) is
708: Select tca.txn_category_attribute_id,tca.object_version_number
709: From pqh_txn_category_attributes tca
710: Where (tca.transaction_category_id = p_transaction_category_id and
711: tca.attribute_id = p_master_attribute
712: ) OR
713: tca.txn_category_attribute_id = p_txn_category_attribute_id
772: -- The following cursor determines the ovn of the master attribute id
773: --
774: Cursor csr_master_attribute is
775: Select tca.object_version_number
776: From pqh_txn_category_attributes tca
777: Where txn_category_attribute_id = p_txn_category_attribute_id
778: for update nowait;
779: --
780: -- The foll cursor selects the txn_category_attribute_id of all the child
781: -- attributes of the passed master attribute
782: --
783: Cursor csr_child_attributes is
784: Select tca.txn_category_attribute_id,tca.object_version_number
785: From pqh_txn_category_attributes tca
786: Where tca.transaction_category_id = p_transaction_category_id
787: and tca.attribute_id in
788: (Select attribute_id
789: From pqh_attributes
789: From pqh_attributes
790: Where master_attribute_id = p_attribute_id)
791: for update nowait;
792: --
793: l_ovn pqh_txn_category_attributes.object_version_number%type;
794: --
795: l_child_id pqh_txn_category_attributes.txn_category_attribute_id%type;
796: l_child_ovn pqh_txn_category_attributes.object_version_number%type;
797: --
791: for update nowait;
792: --
793: l_ovn pqh_txn_category_attributes.object_version_number%type;
794: --
795: l_child_id pqh_txn_category_attributes.txn_category_attribute_id%type;
796: l_child_ovn pqh_txn_category_attributes.object_version_number%type;
797: --
798: l_proc varchar2(72) := 'select_authorization_attribute';
799: --
792: --
793: l_ovn pqh_txn_category_attributes.object_version_number%type;
794: --
795: l_child_id pqh_txn_category_attributes.txn_category_attribute_id%type;
796: l_child_ovn pqh_txn_category_attributes.object_version_number%type;
797: --
798: l_proc varchar2(72) := 'select_authorization_attribute';
799: --
800: Begin
870: -- attributes of the selected master attribute
871: --
872: Cursor csr_child_attributes(p_master_attribute in number) is
873: Select tca.txn_category_attribute_id,tca.object_version_number
874: From pqh_txn_category_attributes tca
875: Where (tca.transaction_category_id = p_transaction_category_id and
876: tca.attribute_id = p_master_attribute
877: ) OR
878: tca.txn_category_attribute_id = p_txn_category_attribute_id
935: -- Cursor to return newly selected routing attributes
936: --
937: Cursor new_rout_attr is
938: Select attribute_id
939: from pqh_txn_category_attributes ptca
940: Where transaction_category_id = p_transaction_category_id
941: and list_identifying_flag = 'Y'
942: and not exists
943: (Select null
964: -- Cursor to return newly selected authorization attributes
965: --
966: Cursor new_auth_attr is
967: Select attribute_id
968: from pqh_txn_category_attributes tca
969: Where transaction_category_id = p_transaction_category_id
970: and member_identifying_flag = 'Y'
971: and not exists
972: (Select null
1126: and assignment_id IS NULL
1127: and attribute_id IS NOT NULL
1128: and attribute_id not in
1129: (Select attribute_id
1130: from pqh_txn_category_attributes
1131: Where transaction_category_id = p_transaction_category_id
1132: and list_identifying_flag = 'Y');
1133: **/
1134: --
1133: **/
1134: --
1135: -- Perf changes
1136: Cursor csr_list_attr is
1137: SELECT ATTRIBUTE_ID FROM PQH_TXN_CATEGORY_ATTRIBUTES
1138: WHERE TRANSACTION_CATEGORY_ID = p_transaction_category_id AND LIST_IDENTIFYING_FLAG = 'Y';
1139: --
1140: Cursor csr_old(p_routing_category_id in number) is
1141: SELECT RNG.ATTRIBUTE_RANGE_ID,RNG.OBJECT_VERSION_NUMBER,RNG.ATTRIBUTE_ID
1244: assignment_id IS NOT NULL)
1245: and attribute_id IS NOT NULL
1246: and attribute_id not in
1247: (Select attribute_id
1248: from pqh_txn_category_attributes
1249: Where transaction_category_id = p_transaction_category_id
1250: and member_identifying_flag = 'Y');
1251: **/
1252: -- Perf changes
1250: and member_identifying_flag = 'Y');
1251: **/
1252: -- Perf changes
1253: Cursor csr_mem_attr is
1254: SELECT ATTRIBUTE_ID FROM PQH_TXN_CATEGORY_ATTRIBUTES
1255: WHERE TRANSACTION_CATEGORY_ID = p_transaction_category_id AND MEMBER_IDENTIFYING_FLAG = 'Y';
1256: --
1257: Cursor csr_auth(p_routing_category_id in number) is
1258: SELECT RNG.ATTRIBUTE_RANGE_ID,RNG.OBJECT_VERSION_NUMBER,RNG.ATTRIBUTE_ID
1323: -- passed transaction category.
1324: --
1325: Cursor csr_attr is
1326: Select attribute_id
1327: from pqh_txn_category_attributes
1328: Where transaction_category_id = p_transaction_category_id
1329: and nvl(identifier_flag,'N') = 'Y'
1330: and list_identifying_flag = 'Y';
1331: --
1341: Where transaction_category_id = p_transaction_category_id)
1342: and nvl(default_flag,'N') <> 'Y'
1343: and nvl(enable_flag,'Y') = 'Y';
1344: --
1345: l_attribute_id pqh_txn_category_attributes.attribute_id%type;
1346: l_proc varchar2(72) := 'disable_rout_hier_if_no_attr';
1347: --
1348: Begin
1349: --
1549: p_all_attribute_range_id out nocopy varchar2) is
1550: --
1551: Cursor csr_rout_attr is
1552: Select attribute_id
1553: from pqh_txn_category_attributes
1554: Where transaction_category_id = p_transaction_category_id
1555: and list_identifying_flag = 'Y';
1556: --
1557: --
1832: p_gen_sys_rule_name out nocopy varchar2) is
1833: --
1834: Cursor csr_auth_attr is
1835: Select attribute_id
1836: from pqh_txn_category_attributes
1837: Where transaction_category_id = p_transaction_category_id
1838: and member_identifying_flag = 'Y';
1839: --
1840: Cursor csr_chk_already_approver is
2197: p_all_attribute_range_id out nocopy varchar2) is
2198: --
2199: Cursor csr_auth_attr is
2200: Select attribute_id
2201: from pqh_txn_category_attributes
2202: Where transaction_category_id = p_transaction_category_id
2203: and member_identifying_flag = 'Y';
2204: --
2205: Cursor csr_sys_rule is
2364: AND NVL(APPROVER_FLAG,'N')= 'Y';
2365: --
2366: Cursor csr_attr is
2367: Select *
2368: from pqh_txn_category_attributes
2369: Where transaction_category_id = p_transaction_category_id;
2370: --
2371: attr_rec pqh_txn_category_Attributes%ROWTYPE;
2372: l_id pqh_txn_category_Attributes.txn_category_attribute_id%type;
2367: Select *
2368: from pqh_txn_category_attributes
2369: Where transaction_category_id = p_transaction_category_id;
2370: --
2371: attr_rec pqh_txn_category_Attributes%ROWTYPE;
2372: l_id pqh_txn_category_Attributes.txn_category_attribute_id%type;
2373: l_ovn pqh_txn_category_Attributes.object_version_number%type;
2374: --
2375: tct_rec pqh_transaction_categories%ROWTYPE;
2368: from pqh_txn_category_attributes
2369: Where transaction_category_id = p_transaction_category_id;
2370: --
2371: attr_rec pqh_txn_category_Attributes%ROWTYPE;
2372: l_id pqh_txn_category_Attributes.txn_category_attribute_id%type;
2373: l_ovn pqh_txn_category_Attributes.object_version_number%type;
2374: --
2375: tct_rec pqh_transaction_categories%ROWTYPE;
2376: tct_id pqh_transaction_categories.transaction_category_id%type;
2369: Where transaction_category_id = p_transaction_category_id;
2370: --
2371: attr_rec pqh_txn_category_Attributes%ROWTYPE;
2372: l_id pqh_txn_category_Attributes.txn_category_attribute_id%type;
2373: l_ovn pqh_txn_category_Attributes.object_version_number%type;
2374: --
2375: tct_rec pqh_transaction_categories%ROWTYPE;
2376: tct_id pqh_transaction_categories.transaction_category_id%type;
2377: tct_ovn pqh_transaction_categories.object_version_number%type;
3238: all_attributes_tab pqh_attribute_ranges_pkg.rule_attr_tab;
3239: --
3240: Cursor csr_mem_ident_cnt is
3241: Select count(*)
3242: from pqh_txn_category_attributes
3243: Where transaction_category_id = p_transaction_category_id
3244: AND member_identifying_flag = 'Y';
3245: --
3246: l_proc varchar2(72) := 'chk_mem_overlap_on_freeze';