DBA Data[Home] [Help]

PACKAGE: APPS.AMS_LISTSOURCETYPE_PVT

Source


1 PACKAGE AMS_ListSourceType_PVT AUTHID CURRENT_USER as
2 /* $Header: amsvlsts.pls 115.10 2003/08/19 09:24:26 kbasavar ship $ */
3 
4 -----------------------------------------------------------
5 -- PACKAGE
6 --    AMS_ListSourceType_PVT
7 --
8 -- PURPOSE
9 --    Private API for Oracle Marketing List Source Types.
10 --
11 -- PROCEDURES
12 --    Create_ListSourceType
13 --    Delete_ListSourceType
14 --    Lock_ListSourceType
15 --    Update_ListSourceType
16 --    Validate_ListSourceType
17 --
18 --    Check_ListSourceType_Items
19 --    Check_ListSourceType_Record
20 --
21 --    Init_ListSourceType_Rec
22 --    Complete_ListSourceType_Rec
23 ------------------------------------------------------------
24 
25 G_PKG_NAME        CONSTANT VARCHAR2(30) := 'AMS_ListSourceType_PVT';
26 
27 TYPE ListSourceType_Rec_Type IS RECORD (
28    list_source_type_id        NUMBER,
29    last_update_date           DATE,
30    last_updated_by            NUMBER,
31    creation_date              DATE,
32    created_by                 NUMBER,
33    last_update_login          NUMBER,
34    object_version_number      NUMBER,
35    list_source_name           VARCHAR2(240),
36    list_source_type           VARCHAR2(30),
37    source_type_code           VARCHAR2(30),
38    source_object_name         VARCHAR2(30),
39    master_source_type_flag    VARCHAR2(1),
40    source_object_pk_field     VARCHAR2(30),
41    enabled_flag               VARCHAR2(1),
42    description                VARCHAR2(4000),
43    view_application_id        NUMBER,
44    java_class_name            VARCHAR2(4000),
45    import_type                VARCHAR2(30),
46    arc_act_src_used_by        VARCHAR2(30),
47    source_category            VARCHAR2(30)
48 );
49 
50 --------------------------------------------------------------------
51 -- PROCEDURE
52 --    Create_ListSourceType
53 --
54 -- PURPOSE
55 --    Create a list source type entry.
56 --
57 -- PARAMETERS
58 --    p_listsrctype_rec: the record representing AMS_LIST_SRC_TYPES.
59 --    x_list_source_type_id: the list_source_type_id.
60 --
61 -- NOTES
62 --    1. object_version_number will be set to 1.
63 --    2. If list_source_type_id is passed in, the uniqueness will be checked.
64 --       Raise exception in case of duplicates.
65 --    3. If list_source_type_id is not passed in, generate a unique one from
66 --       the sequence.
67 --    4. If a flag column is passed in, check if it is 'Y' or 'N'.
68 --       Raise exception for invalid flag.
69 --    5. If a flag column is not passed in, default it to 'Y' or 'N'.
70 --    6. Please don't pass in any FND_API.g_mess_char/num/date.
71 --------------------------------------------------------------------
72 PROCEDURE Create_ListSourceType (
73    p_api_version        IN  NUMBER,
74    p_init_msg_list      IN  VARCHAR2  := FND_API.g_false,
75    p_commit             IN  VARCHAR2  := FND_API.g_false,
76    p_validation_level   IN  NUMBER    := FND_API.g_valid_level_full,
77 
78    x_return_status      OUT NOCOPY VARCHAR2,
79    x_msg_count          OUT NOCOPY NUMBER,
80    x_msg_data           OUT NOCOPY VARCHAR2,
81 
82    p_listsrctype_rec    IN  ListSourceType_Rec_Type,
83    x_list_source_type_id   OUT NOCOPY NUMBER
84 );
85 
86 
87 --------------------------------------------------------------------
88 -- PROCEDURE
89 --    Delete_ListSourceType
90 --
91 -- PURPOSE
92 --    Delete a list source type entry.
93 --
94 -- PARAMETERS
95 --    p_list_source_type_id: the list_source_type_id
96 --    p_object_version: the object_version_number
97 --
98 -- ISSUES
99 --    Currently, we are not allowing people to delete list source type
100 --    entries.  We may add some business rules for deletion though.
101 --
102 -- NOTES
103 --    1. Raise exception if the object_version_number doesn't match.
104 --------------------------------------------------------------------
105 PROCEDURE Delete_ListSourceType (
106    p_api_version        IN  NUMBER,
107    p_init_msg_list      IN  VARCHAR2  := FND_API.g_false,
108    p_commit             IN  VARCHAR2  := FND_API.g_false,
109    p_validation_level   IN  NUMBER    := FND_API.g_valid_level_full,
110 
111    x_return_status      OUT NOCOPY VARCHAR2,
112    x_msg_count          OUT NOCOPY NUMBER,
113    x_msg_data           OUT NOCOPY VARCHAR2,
114 
115    p_list_source_type_id     IN  NUMBER,
116    p_object_version     IN  NUMBER
117 );
118 
119 
120 --------------------------------------------------------------------
121 -- PROCEDURE
122 --    Lock_ListSourceType
123 --
124 -- PURPOSE
125 --    Lock a list source type entry.
126 --
127 -- PARAMETERS
128 --    p_list_source_type_id: the list_source_type_id
129 --    p_object_version: the object_version_number
130 --
131 -- ISSUES
132 --
133 -- NOTES
134 --    1. Raise exception if the object_version_number doesn't match.
135 --------------------------------------------------------------------
136 PROCEDURE Lock_ListSourceType (
137    p_api_version        IN  NUMBER,
138    p_init_msg_list      IN  VARCHAR2  := FND_API.g_false,
139    p_commit             IN  VARCHAR2  := FND_API.g_false,
140    p_validation_level   IN  NUMBER    := FND_API.g_valid_level_full,
141 
142    x_return_status      OUT NOCOPY VARCHAR2,
143    x_msg_count          OUT NOCOPY NUMBER,
144    x_msg_data           OUT NOCOPY VARCHAR2,
145 
146    p_list_source_type_id     IN  NUMBER,
147    p_object_version     IN  NUMBER
148 );
149 
150 
151 --------------------------------------------------------------------
152 -- PROCEDURE
153 --    Update_ListSourceType
154 --
155 -- PURPOSE
156 --    Update a list source type entry.
157 --
158 -- PARAMETERS
159 --    p_listsrctype_rec: the record representing AMS_LIST_SRC_TYPES.
160 --
161 -- NOTES
162 --    1. Raise exception if the object_version_number doesn't match.
163 --    2. If an attribute is passed in as FND_API.g_miss_char/num/date,
164 --       that column won't be updated.
165 --------------------------------------------------------------------
166 PROCEDURE Update_ListSourceType (
167    p_api_version        IN  NUMBER,
168    p_init_msg_list      IN  VARCHAR2  := FND_API.g_false,
169    p_commit             IN  VARCHAR2  := FND_API.g_false,
170    p_validation_level   IN  NUMBER    := FND_API.g_valid_level_full,
171 
172    x_return_status      OUT NOCOPY VARCHAR2,
173    x_msg_count          OUT NOCOPY NUMBER,
174    x_msg_data           OUT NOCOPY VARCHAR2,
175 
176    p_listsrctype_rec    IN  ListSourceType_Rec_Type
177 );
178 
179 
180 --------------------------------------------------------------------
181 -- PROCEDURE
182 --    Validate_ListSourceType
183 --
184 -- PURPOSE
185 --    Validate a list source type entry.
186 --
187 -- PARAMETERS
188 --    p_listsrctype_rec: the record representing AMS_LIST_SRC_TYPES.
189 --
190 -- NOTES
191 --    1. p_listsrctype_rec should be the complete list source type record. There
192 --       should not be any FND_API.g_miss_char/num/date in it.
193 --    2. If FND_API.g_miss_char/num/date is in the record, then raise
194 --       an exception, as those values are not handled.
195 --------------------------------------------------------------------
196 PROCEDURE Validate_ListSourceType (
197    p_api_version        IN  NUMBER,
198    p_init_msg_list      IN  VARCHAR2  := FND_API.g_false,
199    p_commit             IN  VARCHAR2  := FND_API.g_false,
200    p_validation_level   IN  NUMBER    := FND_API.g_valid_level_full,
201 
202    x_return_status      OUT NOCOPY VARCHAR2,
203    x_msg_count          OUT NOCOPY NUMBER,
204    x_msg_data           OUT NOCOPY VARCHAR2,
205 
206    p_listsrctype_rec    IN  ListSourceType_Rec_Type
207 );
208 
209 
210 ---------------------------------------------------------------------
211 -- PROCEDURE
212 --    Check_ListSourceType_Items
213 --
214 -- PURPOSE
215 --    Perform the item level checking including unique keys,
216 --    required columns, foreign keys, domain constraints.
217 --
218 -- PARAMETERS
219 --    p_listsrctype_rec: the record to be validated
220 --    p_validation_mode: JTF_PLSQL_API.g_create/g_update
221 ---------------------------------------------------------------------
222 PROCEDURE Check_ListSourceType_Items (
223    p_listsrctype_rec    IN  ListSourceType_Rec_Type,
224    p_validation_mode    IN  VARCHAR2 := JTF_PLSQL_API.g_create,
225    x_return_status      OUT NOCOPY VARCHAR2
226 );
227 
228 
229 ---------------------------------------------------------------------
230 -- PROCEDURE
231 --    Check_ListSourceType_Record
232 --
233 -- PURPOSE
234 --    Check the record level business rules.
235 --
236 -- PARAMETERS
237 --    p_listsrctype_rec: the record to be validated; may contain attributes
238 --       as FND_API.g_miss_char/num/date
239 --    p_complete_rec: the complete record after all "g_miss" items
240 --       have been replaced by current database values
241 ---------------------------------------------------------------------
242 PROCEDURE Check_ListSourceType_Record (
243    p_listsrctype_rec    IN  ListSourceType_Rec_Type,
244    p_complete_rec       IN  ListSourceType_Rec_Type := NULL,
245    x_return_status      OUT NOCOPY VARCHAR2
246 );
247 
248 
249 ---------------------------------------------------------------------
250 -- PROCEDURE
251 --    Init_ListSourceType_Rec
252 --
253 -- PURPOSE
254 --    Initialize all attributes to be FND_API.g_miss_char/num/date.
255 ---------------------------------------------------------------------
256 PROCEDURE Init_ListSourceType_Rec (
257    x_listsrctype_rec         OUT NOCOPY  ListSourceType_Rec_Type
258 );
259 
260 
261 ---------------------------------------------------------------------
262 -- PROCEDURE
263 --    Complete_ListSourceType_Rec
264 --
265 -- PURPOSE
266 --    For Update_ListSourceType, some attributes may be passed in as
267 --    FND_API.g_miss_char/num/date if the user doesn't want to
268 --    update those attributes. This procedure will replace the
269 --    "g_miss" attributes with current database values.
270 --
271 -- PARAMETERS
272 --    p_listdr_rec: the record which may contain attributes as
273 --       FND_API.g_miss_char/num/date
274 --    x_complete_rec: the complete record after all "g_miss" items
275 --       have been replaced by current database values
276 ---------------------------------------------------------------------
277 PROCEDURE Complete_ListSourceType_Rec (
278    p_listsrctype_rec    IN  ListSourceType_Rec_Type,
279    x_complete_rec       OUT NOCOPY ListSourceType_Rec_Type
280 );
281 
282 
283 END AMS_ListSourceType_PVT;