[Home] [Help]
1560: p_value_number IN NUMBER
1561: ) return BOOLEAN is
1562: cursor l_checkexist_1_csr is
1563: select 1
1564: from AK_OBJECT_ATTRIBUTE_NAVIGATION
1565: where DATABASE_OBJECT_NAME = p_database_object_name
1566: and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
1567: and ATTRIBUTE_CODE = p_attribute_code
1568: and VALUE_VARCHAR2 = p_value_varchar2
1569: and VALUE_DATE is null
1570: and VALUE_NUMBER is null;
1571: cursor l_checkexist_2_csr is
1572: select 1
1573: from AK_OBJECT_ATTRIBUTE_NAVIGATION
1574: where DATABASE_OBJECT_NAME = p_database_object_name
1575: and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
1576: and ATTRIBUTE_CODE = p_attribute_code
1577: and VALUE_VARCHAR2 is null
1578: and VALUE_DATE = p_value_date
1579: and VALUE_NUMBER is null;
1580: cursor l_checkexist_3_csr is
1581: select 1
1582: from AK_OBJECT_ATTRIBUTE_NAVIGATION
1583: where DATABASE_OBJECT_NAME = p_database_object_name
1584: and ATTRIBUTE_APPLICATION_ID = p_attribute_application_id
1585: and ATTRIBUTE_CODE = p_attribute_code
1586: and VALUE_VARCHAR2 is null
1981: and attribute_application_id = p_attribute_application_id
1982: and attribute_code = p_attribute_code;
1983: cursor l_get_navigations_csr is
1984: select value_varchar2, value_date, value_number
1985: from AK_OBJECT_ATTRIBUTE_NAVIGATION
1986: where database_object_name = p_database_object_name
1987: and attribute_application_id = p_attribute_application_id
1988: and attribute_code = p_attribute_code;
1989: cursor l_get_region_item_csr is
2067: -- If we are not deleting any referencing records, we cannot
2068: -- delete the object attribute if it is being referenced in any of
2069: -- following tables.
2070: --
2071: -- AK_OBJECT_ATTRIBUTE_NAVIGATION
2072: --
2073: open l_get_navigations_csr;
2074: fetch l_get_navigations_csr into l_value_varchar2, l_value_date,
2075: l_value_number;
2136: else
2137: --
2138: -- Otherwise, delete all referencing rows in other tables
2139: --
2140: -- AK_OBJECT_ATTRIBUTE_NAVIGATION
2141: --
2142: open l_get_navigations_csr;
2143: loop
2144: fetch l_get_navigations_csr into l_value_varchar2, l_value_date,
2445: -- delete object attribute navigation record once we checked that there
2446: -- are no references to it, or all references have been deleted.
2447: --
2448: if (p_value_varchar2 is not null) then
2449: delete from ak_object_attribute_navigation
2450: where database_object_name = p_database_object_name
2451: and attribute_application_id = p_attribute_application_id
2452: and attribute_code = p_attribute_code
2453: and value_varchar2 = p_value_varchar2
2453: and value_varchar2 = p_value_varchar2
2454: and value_date is null
2455: and value_number is null;
2456: elsif (p_value_date is not null) then
2457: delete from ak_object_attribute_navigation
2458: where database_object_name = p_database_object_name
2459: and attribute_application_id = p_attribute_application_id
2460: and attribute_code = p_attribute_code
2461: and value_varchar2 is null
2461: and value_varchar2 is null
2462: and value_date = p_value_date
2463: and value_number is null;
2464: elsif (p_value_number is not null) then
2465: delete from ak_object_attribute_navigation
2466: where database_object_name = p_database_object_name
2467: and attribute_application_id = p_attribute_application_id
2468: and attribute_code = p_attribute_code
2469: and value_varchar2 is null
4565: p_create_or_update => 'CREATE') then
4566: null;
4567: end if;
4568:
4569: insert into AK_OBJECT_ATTRIBUTE_NAVIGATION (
4570: DATABASE_OBJECT_NAME,
4571: ATTRIBUTE_APPLICATION_ID,
4572: ATTRIBUTE_CODE,
4573: VALUE_VARCHAR2,