1: PACKAGE BODY qa_char_indexes_pkg AS
2: /* $Header: qaindexb.pls 120.2 2011/06/13 08:04:42 ntungare noship $ */
3:
4: -- A constant to fool GSCC. See bug 3554899
5: -- Copied from qltvcreb
27:
28:
29: CURSOR c_enabled(p_char_id NUMBER) IS
30: SELECT enabled_flag
31: FROM qa_char_indexes
32: WHERE char_id = p_char_id;
33:
34:
35: FUNCTION index_exists(p_char_id NUMBER)
95: --
96:
97: CURSOR c IS
98: SELECT default_result_column
99: FROM qa_char_indexes
100: WHERE char_id = p_char_id AND enabled_flag = 1;
101:
102: l_result_column VARCHAR2(30);
103:
120: -- a negative error code if not (or if index doesn't exist).
121: -- Does not perform database commit.
122: --
123: BEGIN
124: UPDATE qa_char_indexes
125: SET enabled_flag = 2
126: WHERE char_id = p_char_id;
127:
128: RETURN 0;
587: p_additional_parameters VARCHAR2) IS
588:
589: CURSOR c IS
590: SELECT rowid
591: FROM qa_char_indexes
592: WHERE char_id = p_char_id;
593:
594: BEGIN
595: INSERT INTO qa_char_indexes(
591: FROM qa_char_indexes
592: WHERE char_id = p_char_id;
593:
594: BEGIN
595: INSERT INTO qa_char_indexes(
596: created_by,
597: creation_date,
598: last_updated_by,
599: last_update_date,
646: --
647: BEGIN
648:
649: DELETE
650: FROM qa_char_indexes
651: WHERE char_id = p_char_id;
652:
653: IF SQL%NOTFOUND THEN
654: RAISE no_data_found;
659:
660: FUNCTION drop_index(p_char_id NUMBER) RETURN INTEGER IS
661: --
662: -- Main function to drop an index. If successful, the index record in
663: -- qa_char_indexes table is also deleted to register the fact.
664: --
665: -- Return 0 if successful, a negative error code if not.
666: --
667: -- Because this is a DDL, by definition a commit is
672:
673: l_ddl VARCHAR2(100);
674: CURSOR c IS
675: SELECT index_name
676: FROM qa_char_indexes
677: WHERE char_id = p_char_id;
678:
679: Cursor c_num_idx IS
680: SELECT index_name from all_indexes
757: --
758: -- Main function to create or regenerate index.
759: -- If an index already exists, then it is dropped before
760: -- creating. If an index is created or regenerated
761: -- successfully, then the qa_char_indexes table is
762: -- updated with that fact.
763: --
764: -- Return 0 if successful, a negative error code if not.
765: --
827: -- for varchar2 conversions. kabalakr.
828:
829: CURSOR c IS
830: SELECT dbms_lob.substr(text, dbms_lob.getlength(text), 1)
831: FROM qa_char_indexes
832: WHERE char_id = p_char_id AND enabled_flag = 1;
833:
834: BEGIN
835: OPEN c;
883: l_return NUMBER;
884:
885: BEGIN
886:
887: fnd_file.put_line(fnd_file.log, 'qa_char_indexes_pkg: entered the wrapper');
888:
889: l_type_of_action := to_number(argument1);
890: l_char_id := to_number(argument3);
891:
924: retcode := 2;
925: END IF;
926: END IF;
927:
928: fnd_file.put_line(fnd_file.log, 'qa_char_indexes_pkg: exiting the wrapper');
929:
930: END wrapper;
931:
932:
1004: status => g_status,
1005: industry => g_industry,
1006: oracle_schema => g_qa_schema);
1007:
1008: END qa_char_indexes_pkg;