1 PACKAGE GL_JAHE_PKG as
2 /* $Header: glajahes.pls 120.15 2006/01/19 10:51:28 knag noship $ */
3
4 --
5 -- Function
6 -- has_loop
7 -- PURPOSE
8 -- Tree Loop Detection
9 -- Check to see if the source is in the parent path of target.
10 -- This is a recursive function.
11 -- History
12 -- 13-JAN-00 Maria Hui Created
13 -- Arguments
14 -- source drag source - new child
15 -- target drop target - parent to receive the new child
16 -- value_set_id flex value set id
17 -- Return
18 -- TRUE if there is loop in the drag and drop
19 -- FALSE if drag and drop results in no loop
20 -- Notes
21 --
22
23 FUNCTION has_loop (source IN VARCHAR2,
24 target IN VARCHAR2,
25 value_set_id IN NUMBER) RETURN VARCHAR2;
26
27 --
28 -- Function
29 -- modify_range
30 -- PURPOSE
31 -- Range Split
32 -- Determine how the range will be affected by a drag and drop action.
33 -- Depending on the position that the node that is being dragged in the
34 -- range. It may cause a range delection, range boundary modificaiton,
35 -- or range split.
36 -- History
37 -- 26-JAN-00 Maria Hui Created
38 -- Arguments
39 -- parent old parent of the node that is being dragged away
40 -- child the node that is being dragged away
41 -- range_attr range attribute for the existing range
42 -- range_low child_flex_value_low of the current range
43 -- range_high child_flex_value_high of the current range
44 -- value_set_id flex value set id of the row
45 -- Return
46 -- 1 if the range split can be handled successfully
47 -- 0 if there is any exception raised
48 -- Notes
49 --
50
51 FUNCTION modify_range ( parent IN VARCHAR2,
52 child IN VARCHAR2,
53 range_attr IN VARCHAR2,
54 range_low IN VARCHAR2,
55 range_high IN VARCHAR2,
56 value_set_id IN NUMBER) RETURN INTEGER;
57
58 --
59 -- Function
60 -- has_loop_in_range
61 -- PURPOSE
62 -- Loop Detection in Range Manipulation
63 -- Check to see if the new or edited range create loop in the hierarchy.
64 -- History
65 -- 30-MAY-00 Maria Hui Created
66 -- Arguments
67 -- parent parent whose range is being modified
68 -- low lower bound of the new range
69 -- high upper bound of the new range
70 -- value_set_id flex value set id
71 -- Return
72 -- NULL if the new range will not cause any loop with existing range
73 -- flex_value flex value in the new range that is causing a loop
74 -- Notes
75 --
76
77 FUNCTION has_loop_in_range(parent IN VARCHAR2,
78 low IN VARCHAR2,
79 high IN VARCHAR2,
80 value_set_id IN NUMBER) RETURN VARCHAR2;
81
82 --
83 -- Procedure
84 -- Merge_Range
85 -- PURPOSE
86 -- Merge the current ranges. It merges the ranges in the temporary
87 -- table GL_AHE_DETAIL_RANGES_GT that with a status of 'C' (current) and
88 -- store the merged ranges back to the temporary table with a status
89 -- 'M'. For overlapping ranges, it merges immediately. For non-
90 -- overlapping ranges, they can be merged if there are no flex values
91 -- between the ranges.
92 -- History
93 -- 7-JUN-00 Maria Hui Created
94 -- Arguments
95 -- parent parent whose range is being merged
96 -- value_set_id flex value set id of the parent flex value
97 -- Notes
98 --
99 PROCEDURE merge_range ( parent IN VARCHAR2,
100 value_set_id IN NUMBER);
101
102 --
103 -- Function
104 -- unique_flex_value
105 -- PURPOSE
106 -- Checks to see if the flex value is unique.
107 -- History
108 -- 21-JUN-00 Maria Hui Created
109 -- Arguments
110 -- f_value flex value in concern
111 -- parent_low parent flex value low
112 -- value_set_id flex value set id
113 -- Return
114 -- TRUE if the value is unique
115 -- FALSE otherwise
116 -- Notes
117 --
118
119 FUNCTION unique_flex_value (f_value IN VARCHAR2,
120 parent_low IN VARCHAR2,
121 value_set_id IN NUMBER) RETURN VARCHAR2;
122
123 FUNCTION getCOAClause( user_id IN NUMBER,
124 resp_id IN NUMBER,
125 appl_id IN NUMBER) RETURN VARCHAR2;
126
127 FUNCTION access_test RETURN VARCHAR2;
128
129 PROCEDURE lock_flex_value_set (fvsid NUMBER);
130
131 PROCEDURE flatten_hierarchy (fvsid NUMBER);
132
133 PROCEDURE insert_tl_records (fvsid NUMBER DEFAULT NULL);
134
135 PROCEDURE launch;
136
137 END GL_JAHE_PKG ;