1 PACKAGE PVX_Mdf_Owners_PVT AUTHID CURRENT_USER AS
2 /* $Header: pvxvmdfs.pls 115.5 2002/01/28 11:24:47 pkm ship $ */
3
4
5 TYPE mdf_owner_rec_type IS RECORD
6 (
7 MDF_OWNER_ID NUMBER,
8 COUNTRY VARCHAR2(100),
9 FROM_POSTAL_CODE VARCHAR2(40),
10 TO_POSTAL_CODE VARCHAR2(40),
11 CMM_RESOURCE_ID NUMBER,
12 LAST_UPDATE_DATE DATE,
13 LAST_UPDATED_BY NUMBER,
14 CREATION_DATE DATE,
15 CREATED_BY NUMBER,
16 LAST_UPDATE_LOGIN NUMBER,
17 OBJECT_VERSION_NUMBER NUMBER,
18 REQUEST_ID NUMBER,
19 PROGRAM_APPLICATION_ID NUMBER,
20 PROGRAM_ID NUMBER,
21 PROGRAM_UPDATE_DATE DATE
22 );
23
24
25
26 ---------------------------------------------------------------------
27 -- PROCEDURE
28 -- Create_Mdf_Owner
29 --
30 -- PURPOSE
31 -- Create a new mdf owner record
32 --
33 -- PARAMETERS
34 -- p_mdf_owner_rec : the new record to be inserted
35 -- x_mdf_owner_id : return the mdf_owner_id of the new record.
36 --
37 -- NOTES
38 -- 1. object_version_number will be set to 1.
39 -- 2. If mdf_owner_id is passed in, the uniqueness will be checked.
40 -- Raise exception in case of duplicates.
41 -- 3. If mdf_owner_id is not passed in, generate a unique one from
42 -- the sequence.
43 -- 4. If a flag column is passed in, check if it is 'Y' or 'N'.
44 -- Raise exception for invalid flag.
45 -- 5. If a flag column is not passed in, default it to 'Y' or 'N'.
46 -- 6. Please don't pass in any FND_API.g_mess_char/num/date.
47 ---------------------------------------------------------------------
48 PROCEDURE Create_Mdf_Owner(
49 p_api_version IN NUMBER
50 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
51 ,p_commit IN VARCHAR2 := FND_API.g_false
52 ,p_validation_level IN NUMBER := FND_API.g_valid_level_full
53
54 ,x_return_status OUT VARCHAR2
55 ,x_msg_count OUT NUMBER
56 ,x_msg_data OUT VARCHAR2
57
58 ,p_mdf_owner_rec IN mdf_owner_rec_type
59 ,x_mdf_owner_id OUT NUMBER
60 );
61
62
63 --------------------------------------------------------------------
64 -- PROCEDURE
65 -- Delete_Mdf_Owner
66 --
67 -- PURPOSE
68 -- Delete a Mdf_Owner_id.
69 --
70 -- PARAMETERS
71 -- p_mdf_owner_id: the mdf_owner_id
72 -- p_object_version: the object_version_number
73 --
74 -- NOTES
75 -- 1. Raise exception if the object_version_number doesn't match.
76 --------------------------------------------------------------------
77 PROCEDURE Delete_Mdf_Owner(
78 p_api_version IN NUMBER
79 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
80 ,p_commit IN VARCHAR2 := FND_API.g_false
81
82 ,x_return_status OUT VARCHAR2
83 ,x_msg_count OUT NUMBER
84 ,x_msg_data OUT VARCHAR2
85
86 ,p_mdf_owner_id IN NUMBER
87 ,p_object_version IN NUMBER
88
89 );
90
91
92 -------------------------------------------------------------------
93 -- PROCEDURE
94 -- Lock_mdf_owner_id
95 --
96 -- PURPOSE
97 -- Lock a mdf_owner_id.
98 --
99 -- PARAMETERS
100 -- p_mdf_owner_id:
101 -- p_object_version: the object_version_number
102 --
103 -- NOTES
104 -- 1. Raise exception if the object_version_number doesn't match.
105 --------------------------------------------------------------------
106 PROCEDURE Lock_Mdf_Owner(
107 p_api_version IN NUMBER
108 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
109
110 ,x_return_status OUT VARCHAR2
111 ,x_msg_count OUT NUMBER
112 ,x_msg_data OUT VARCHAR2
113
114 ,p_mdf_owner_id IN NUMBER
115 ,p_object_version IN NUMBER
116 );
117
118
119 ---------------------------------------------------------------------
120 -- PROCEDURE
121 -- Update_Mdf_Owner
122 --
123 -- PURPOSE
124 -- Update a mdf_owner.
125 --
126 -- PARAMETERS
127 -- p_mdf_owner_rec: the record with new items.
128 -- p_mode : determines what sort of validation is to be performed during update.
129 --
130 -- NOTES
131 -- 1. Raise exception if the object_version_number doesn't match.
132 -- 2. If an attribute is passed in as FND_API.g_miss_char/num/date,
133 -- that column won't be updated.
134 ----------------------------------------------------------------------
135 PROCEDURE Update_Mdf_Owner(
136 p_api_version IN NUMBER
137 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
138 ,p_commit IN VARCHAR2 := FND_API.g_false
139 ,p_validation_level IN NUMBER := FND_API.g_valid_level_full
140
141 ,x_return_status OUT VARCHAR2
142 ,x_msg_count OUT NUMBER
143 ,x_msg_data OUT VARCHAR2
144 ,p_mdf_owner_rec IN mdf_owner_rec_type
145
146 );
147
148
149 ---------------------------------------------------------------------
150 -- PROCEDURE
151 -- Validate_Mdf_Owner_values
152 --
153 -- PURPOSE
154 -- Validate a Mdf_Owner_id record.
155 --
156 -- PARAMETERS
157 -- p_mdf_owner_rec: the record to be validated
158 --
159 -- NOTES
160 -- 1. p_enty_attr_val_rec should be the complete record. There
161 -- should not be any FND_API.g_miss_char/num/date in it.
162 ----------------------------------------------------------------------
163 PROCEDURE Validate_Mdf_Owner(
164 p_api_version IN NUMBER
165 ,p_init_msg_list IN VARCHAR2 := FND_API.g_false
166 ,p_validation_level IN NUMBER := FND_API.g_valid_level_full
167
168 ,x_return_status OUT VARCHAR2
169 ,x_msg_count OUT NUMBER
170 ,x_msg_data OUT VARCHAR2
171
172 ,p_mdf_owner_rec IN mdf_owner_rec_type
173 );
174
175
176 ---------------------------------------------------------------------
177 -- PROCEDURE
178 -- Check_mdf_owner_items
179 --
180 -- PURPOSE
181 -- Perform the item level checking including unique keys,
182 -- required columns, foreign keys, domain constraints.
183 --
184 -- PARAMETERS
185 -- p_mdf_owner_rec: the record to be validated
186 -- p_validation_mode: JTF_PLSQL_API.g_create/g_update
187 ---------------------------------------------------------------------
188 PROCEDURE Check_Mdf_Owner_Items(
189 p_validation_mode IN VARCHAR2 := JTF_PLSQL_API.g_create
190 ,x_return_status OUT VARCHAR2
191 ,p_mdf_owner_rec IN mdf_owner_rec_type
192 );
193
194
195 ---------------------------------------------------------------------
196 -- PROCEDURE
197 -- Check_mdf_owner_Record
198 --
199 -- PURPOSE
200 -- Check the record level business rules.
201 --
202 -- PARAMETERS
203 -- p_mdf_owner_rec: the record to be validated; may contain attributes
204 -- as FND_API.g_miss_char/num/date
205 -- p_complete_rec: the complete record after all "g_miss" items
206 -- have been replaced by current database values
207 ---------------------------------------------------------------------
208 PROCEDURE Check_mdf_owner_rec(
209 p_mdf_owner_rec IN mdf_owner_rec_type
210 ,p_complete_rec IN mdf_owner_rec_type := NULL
211 ,p_mode IN VARCHAR2 := 'INSERT'
212 ,x_return_status OUT VARCHAR2
213 );
214
215
216 ---------------------------------------------------------------------
217 -- PROCEDURE
218 -- Init_mdf_owner_rec
219 --
220 -- PURPOSE
221 -- Initialize all attributes to be FND_API.g_miss_char/num/date.
222 ---------------------------------------------------------------------
223 PROCEDURE Init_mdf_owner_rec(
224 x_mdf_owner_rec OUT mdf_owner_rec_type
225 );
226
227
228 ---------------------------------------------------------------------
229 -- PROCEDURE
230 -- Complete_mdf_owner_rec
231 --
232 -- PURPOSE
233 -- For update, some attributes may be passed in as
234 -- FND_API.g_miss_char/num/date if the user doesn't want to
235 -- update those attributes. This procedure will replace the
236 -- "g_miss" attributes with current database values.
237 --
238 -- PARAMETERS
239 -- p_mdf_owner_rec: the record which may contain attributes as
240 -- FND_API.g_miss_char/num/date
241 -- x_complete_rec: the complete record after all "g_miss" items
242 -- have been replaced by current database values
243 ---------------------------------------------------------------------
244 PROCEDURE Complete_mdf_owner_rec(
245 p_mdf_owner_rec IN mdf_owner_rec_type
246 ,x_complete_rec OUT mdf_owner_rec_type
247 );
248
249
250 END PVX_mdf_owners_PVT;