1 PACKAGE AMS_Adv_Filter_PVT AUTHID CURRENT_USER AS
2 /* $Header: amsvadfs.pls 115.8 2003/09/10 05:44:22 kbasavar ship $ */
3 -- ===============================================================
4 -- Start of Comments
5 -- Package name
6 -- AMS_Adv_Filter_PVT
7 -- Purpose
8 --
9 -- History
10 -- 20-Aug-2003 rosharma Fixed bug 3104201.
11 --
12 -- NOTE
13 --
14 -- End of Comments
15 -- ===============================================================
16
17 -- Default number of records fetch per call
18 G_DEFAULT_NUM_REC_FETCH NUMBER := 30;
19 --===================================================================
20 -- Start of Comments
21 -- -------------------------------------------------------
22 -- Record name
23 -- filter_rec_type
24 -- -------------------------------------------------------
25 -- Parameters:
26 -- query_param_id - Parameter Id
27 -- query_id - Query Id from jtf_perz_query table.
28 -- parameter_name - FieldId from ams_list_src_fields_vl
29 -- parameter_type - Comma Seperated Value which contains the Unique
30 -- combination od objType+colId(any unique ID..in some
31 -- cases objId)+dataSourceId
32 -- parameter_value - Value of the Field.(Filter)
33 -- parameter_condition - Filter Condition
34 -- parameter_sequence - Filter Sequence. Not used right now.
35 -- created_by - Created By. Standard Column
36 -- last_updated_by - Last Updated By Id
37 -- last_update_date - Last Update Date
38 -- last_update_login - Last Update Login
39 -- security_group_id - Security Group Id.
40
41 --===================================================================
42 TYPE filter_rec_type IS RECORD
43 (
44 query_param_id NUMBER := FND_API.G_MISS_NUM,
45 query_id NUMBER := FND_API.G_MISS_NUM,
46 parameter_name VARCHAR2(60) := FND_API.G_MISS_CHAR,
47 parameter_type VARCHAR2(30) := FND_API.G_MISS_CHAR,
48 parameter_value VARCHAR2(60) := FND_API.G_MISS_CHAR,
49 parameter_condition VARCHAR2(5) := FND_API.G_MISS_CHAR,
50 parameter_sequence NUMBER := FND_API.G_MISS_NUM,
51 created_by NUMBER := FND_API.G_MISS_NUM,
52 last_updated_by NUMBER := FND_API.G_MISS_NUM,
53 last_update_date DATE := FND_API.G_MISS_DATE,
54 last_update_login NUMBER := FND_API.G_MISS_NUM,
55 security_group_id NUMBER := FND_API.G_MISS_NUM
56 );
57
58 g_miss_filter_rec filter_rec_type;
59
60 TYPE filter_rec_tbl_type IS TABLE OF filter_rec_type INDEX BY BINARY_INTEGER;
61 g_miss_filter_rec_tbl filter_rec_tbl_type;
62
63 -- ==============================================================================
64 -- Start of Comments
65 -- ==============================================================================
66 -- API Name
67 -- Create_Filter_Row
68 -- Type
69 -- Private
70 -- Pre-Req
71 --
72 -- Parameters
73 --
74 -- IN
75 -- p_api_version_number IN NUMBER Required
76 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API_G_FALSE
77 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
78 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
79 -- p_filter_rec IN filter_rec_type Required
80 --
81 -- OUT
82 -- x_return_status OUT NOCOPY VARCHAR2
83 -- x_msg_count OUT NOCOPY NUMBER
84 -- x_msg_data OUT NOCOPY VARCHAR2
85 -- Version : Current version 1.0
86 -- Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
87 -- and basic operation, developer must manually add parameters and business logic as necessary.
88 --
89 -- End of Comments
90 -- ==============================================================================
91 --
92
93 PROCEDURE Create_Filter_Row
94 (
95 p_api_version_number IN NUMBER,
96 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
97 p_commit IN VARCHAR2 := FND_API.G_FALSE,
98 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
99 x_return_status OUT NOCOPY VARCHAR2,
100 x_msg_count OUT NOCOPY NUMBER,
101 x_msg_data OUT NOCOPY VARCHAR2,
102 p_filter_rec IN filter_rec_type := g_miss_filter_rec,
103 x_query_param_id OUT NOCOPY NUMBER
104 );
105
106
107 -- ==============================================================================
108 -- Start of Comments
109 -- ==============================================================================
110 -- API Name
111 -- Update_Filter_Row
112 -- Type
113 -- Private
114 -- Pre-Req
115 --
116 -- Parameters
117 --
118 -- IN
119 -- p_api_version_number IN NUMBER Required
120 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API_G_FALSE
121 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
122 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
123 -- p_filter_rec IN filter_rec_type Required
124 --
125 -- OUT NOCOPY
126 -- x_return_status OUT NOCOPY VARCHAR2
127 -- x_msg_count OUT NOCOPY NUMBER
128 -- x_msg_data OUT NOCOPY VARCHAR2
129 -- Version : Current version 1.0
130 -- Note: This automatic generated procedure definition, it includes standard IN/OUT parameters
131 -- and basic operation, developer must manually add parameters and business logic as necessary.
132 --
133 -- End of Comments
134 -- ==============================================================================
135 --
136
137 PROCEDURE Update_Filter_Row(
138 p_api_version_number IN NUMBER,
139 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
140 p_commit IN VARCHAR2 := FND_API.G_FALSE,
141 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
142 x_return_status OUT NOCOPY VARCHAR2,
143 x_msg_count OUT NOCOPY NUMBER,
144 x_msg_data OUT NOCOPY VARCHAR2,
145 p_filter_rec IN filter_rec_type
146 );
147
148
149
150 -- ==============================================================================
151 -- API Name
152 -- Delete_Filter_Row
153 -- Type
154 -- Private
155 -- Pre-Req
156 --
157 -- Parameters
158 --
159 -- IN
160 -- p_api_version_number IN NUMBER Required
161 -- p_init_msg_list IN VARCHAR2 Optional Default = FND_API_G_FALSE
162 -- p_commit IN VARCHAR2 Optional Default = FND_API.G_FALSE
163 -- p_validation_level IN NUMBER Optional Default = FND_API.G_VALID_LEVEL_FULL
164 -- p_query_param_id IN NUMBER
165 --
166 -- OUT NOCOPY
167 -- x_return_status OUT NOCOPY VARCHAR2
168 -- x_msg_count OUT NOCOPY NUMBER
169 -- x_msg_data OUT NOCOPY VARCHAR2
170 -- ==============================================================================
171
172
173 PROCEDURE Delete_Filter_Row
174 (
175 p_api_version_number IN NUMBER,
176 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
177 p_commit IN VARCHAR2 := FND_API.G_FALSE,
178 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
179 x_return_status OUT NOCOPY VARCHAR2,
180 x_msg_count OUT NOCOPY NUMBER,
181 x_msg_data OUT NOCOPY VARCHAR2,
182 p_query_param_id IN NUMBER
183 );
184
185
186
187 -- ==============================================================================
188 -- validation procedures
189 -- p_validation_mode is a constant defined in null_UTILITY_PVT package
190 -- For create: G_CREATE, for update: G_UPDATE
191 -- Note: 1. This is automated generated item level validation procedure.
192 -- The actual validation detail is needed to be added.
193 -- 2. We can also validate table instead of record. There will be an option for user to choose.
194 -- ==============================================================================
195
196 PROCEDURE Validate_Filter_Row
197 (
198 p_api_version_number IN NUMBER,
199 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
200 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
201 p_filter_rec IN filter_rec_type,
202 p_validation_mode IN VARCHAR2,
203 x_return_status OUT NOCOPY VARCHAR2,
204 x_msg_count OUT NOCOPY NUMBER,
205 x_msg_data OUT NOCOPY VARCHAR2
206 );
207
208 -- ==============================================================================
209 -- validation procedures
210 --
211 -- p_validation_mode is a constant defined in null_UTILITY_PVT package
212 -- For create: G_CREATE, for update: G_UPDATE
213 -- Note: 1. This is automated generated item level validation procedure.
214 -- The actual validation detail is needed to be added.
215 -- 2. Validate the unique keys, lookups here
216 -- ==============================================================================
217
218 PROCEDURE Check_filter_Items (
219 p_filter_rec IN filter_rec_type,
220 p_validation_mode IN VARCHAR2,
221 x_return_status OUT NOCOPY VARCHAR2
222 );
223
224
225
226 -- ==============================================================================
227 -- Record level validation procedures
228 --
229 -- p_validation_mode is a constant defined in null_UTILITY_PVT package
230 -- For create: G_CREATE, for update: G_UPDATE
231 -- Note: 1. This is automated generated item level validation procedure.
232 -- The actual validation detail is needed to be added.
233 -- 2. Developer can manually added inter-field level validation.
234 -- ==============================================================================
235
236 PROCEDURE Validate_Filter_Row_Rec
237 (
238 p_api_version_number IN NUMBER,
239 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
240 x_return_status OUT NOCOPY VARCHAR2,
241 x_msg_count OUT NOCOPY NUMBER,
242 x_msg_data OUT NOCOPY VARCHAR2,
243 p_filter_rec IN filter_rec_type
244 );
245
246
247
248
249 PROCEDURE Get_filter_data
253 p_dataSourceId IN NUMBER,
250 (
251 p_objType IN VARCHAR2,
252 p_objectId IN NUMBER,
254 x_return_status OUT NOCOPY VARCHAR2,
255 x_msg_count OUT NOCOPY NUMBER,
256 x_msg_data OUT NOCOPY VARCHAR2,
257 x_filters OUT NOCOPY filter_rec_tbl_type
258 );
259
260 PROCEDURE copy_filter_data (
261 p_api_version IN NUMBER,
262 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
263 p_commit IN VARCHAR2 := FND_API.G_FALSE,
264 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
265 p_objType IN VARCHAR2,
266 p_old_objectId IN NUMBER,
267 p_new_objectId IN NUMBER,
268 p_dataSourceId IN NUMBER,
269 x_return_status OUT NOCOPY VARCHAR2,
270 x_msg_count OUT NOCOPY NUMBER,
271 x_msg_data OUT NOCOPY VARCHAR2
272 );
273
274 END AMS_Adv_Filter_PVT;
275