DBA Data[Home] [Help]

PACKAGE: APPS.OTA_LPT_SHD

Source


1 Package ota_lpt_shd as
2 /* $Header: otlptrhi.pkh 120.0 2005/05/29 07:24:56 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (learning_path_id                number(9)
10   ,language                        varchar2(9)       -- Increased length
11   ,name                            varchar2(80)
12   ,description                     varchar2(4000)
13   ,objectives                      varchar2(4000)
14   ,purpose                         varchar2(2000)
15   ,keywords                        varchar2(2000)
16   ,source_lang                     varchar2(9)
17   );
18 --
19 -- ----------------------------------------------------------------------------
20 -- |           Global Definitions - Internal Development Use Only             |
21 -- ----------------------------------------------------------------------------
22 --
23 g_old_rec  g_rec_type;                            -- Global record definition
24 -- Global table name
25 g_tab_nam  constant varchar2(30) := 'OTA_LEARNING_PATHS_TL';
26 --
27 -- ----------------------------------------------------------------------------
28 -- |---------------------------< constraint_error >---------------------------|
29 -- ----------------------------------------------------------------------------
30 -- {Start Of Comments}
31 --
32 -- Description:
33 --   This procedure is called when a constraint has been violated (i.e.
34 --   The exception hr_api.check_integrity_violated,
35 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
36 --   hr_api.unique_integrity_violated has been raised).
37 --   The exceptions can only be raised as follows:
38 --   1) A check constraint can only be violated during an INSERT or UPDATE
39 --      dml operation.
40 --   2) A parent integrity constraint can only be violated during an
41 --      INSERT or UPDATE dml operation.
42 --   3) A child integrity constraint can only be violated during an
43 --      DELETE dml operation.
44 --   4) A unique integrity constraint can only be violated during INSERT or
45 --      UPDATE dml operation.
46 --
47 -- Prerequisites:
48 --   1) Either hr_api.check_integrity_violated,
49 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
50 --      hr_api.unique_integrity_violated has been raised with the subsequent
51 --      stripping of the constraint name from the generated error message
52 --      text.
53 --   2) Standalone validation test which corresponds with a constraint error.
54 --
55 -- In Parameter:
56 --   p_constraint_name is in upper format and is just the constraint name
57 --   (e.g. not prefixed by brackets, schema owner etc).
58 --
59 -- Post Success:
60 --   Development dependant.
61 --
62 -- Post Failure:
63 --   Developement dependant.
64 --
65 -- Developer Implementation Notes:
66 --   For each constraint being checked the hr system package failure message
67 --   has been generated as a template only. These system error messages should
68 --   be modified as required (i.e. change the system failure message to a user
69 --   friendly defined error message).
70 --
71 -- Access Status:
72 --   Internal Development Use Only.
73 --
74 -- {End Of Comments}
75 -- ----------------------------------------------------------------------------
76 Procedure constraint_error
77   (p_constraint_name in all_constraints.constraint_name%TYPE);
78 --
79 -- ----------------------------------------------------------------------------
80 -- |-----------------------------< api_updating >-----------------------------|
81 -- ----------------------------------------------------------------------------
82 --  {Start Of Comments}
83 --
84 -- Description:
85 --   This function is used to populate the g_old_rec record with the
86 --   current row from the database for the specified primary key
87 --   provided that the primary key exists and is valid and does not
88 --   already match the current g_old_rec. The function will always return
89 --   a TRUE value if the g_old_rec is populated with the current row.
90 --   A FALSE value will be returned if all of the primary key arguments
91 --   are null.
92 --
93 -- Prerequisites:
94 --   None.
95 --
96 -- In Parameters:
97 --
98 -- Post Success:
99 --   A value of TRUE will be returned indiciating that the g_old_rec
100 --   is current.
101 --   A value of FALSE will be returned if all of the primary key arguments
102 --   have a null value (this indicates that the row has not be inserted into
103 --   the Schema), and therefore could never have a corresponding row.
104 --
105 -- Post Failure:
106 --   A failure can only occur under two circumstances:
107 --   1) The primary key is invalid (i.e. a row does not exist for the
108 --      specified primary key values).
109 --   2) If an object_version_number exists but is NOT the same as the current
110 --      g_old_rec value.
111 --
112 -- Developer Implementation Notes:
113 --   None.
114 --
115 -- Access Status:
116 --   Internal Development Use Only.
117 --
118 -- {End Of Comments}
119 -- ----------------------------------------------------------------------------
120 Function api_updating
121   (p_learning_path_id                     in     number
122   ,p_language                             in     varchar2
123   )      Return Boolean;
124 --
125 -- ----------------------------------------------------------------------------
126 -- |---------------------------------< lck >----------------------------------|
127 -- ----------------------------------------------------------------------------
128 -- {Start of comments}
129 --
130 -- Description:
131 --   The Lck process has two main functions to perform. Firstly, the row to be
132 --   updated or deleted must be locked. The locking of the row will only be
133 --   successful if the row is not currently locked by another user.
134 --   Secondly, during the locking of the row, the row is selected into
135 --   the g_old_rec data structure which enables the current row values from
136 --   the server to be available to the api.
137 --
138 -- Prerequisites:
139 --   When attempting to call the lock the object version number (if defined)
140 --   is mandatory.
141 --
142 -- In Parameters:
143 --   The arguments to the Lck process are the primary key(s) which uniquely
144 --   identify the row and the object version number of row.
145 --
146 -- Post Success:
147 --   On successful completion of the Lck process the row to be updated or
148 --   deleted will be locked and selected into the global data structure
149 --   g_old_rec.
150 --
151 -- Post Failure:
152 --   The Lck process can fail for three reasons:
153 --   1) When attempting to lock the row the row could already be locked by
154 --      another user. This will raise the HR_Api.Object_Locked exception.
155 --   2) The row which is required to be locked doesn't exist in the HR Schema.
156 --      This error is trapped and reported using the message name
157 --      'HR_7220_INVALID_PRIMARY_KEY'.
158 --   3) The row although existing in the HR Schema has a different object
159 --      version number than the object version number specified.
160 --      This error is trapped and reported using the message name
161 --      'HR_7155_OBJECT_INVALID'.
162 --
163 -- Developer Implementation Notes:
164 --   For each primary key and the object version number arguments add a
165 --   call to hr_api.mandatory_arg_error procedure to ensure that these
166 --   argument values are not null.
167 --
168 -- Access Status:
169 --   Internal Development Use Only.
170 --
171 -- {End of comments}
172 -- ----------------------------------------------------------------------------
173 Procedure lck
174   (p_learning_path_id                     in     number
175   ,p_language                             in     varchar2
176   );
177 --
178 -- ----------------------------------------------------------------------------
179 -- |----------------------------< add_language >------------------------------|
180 -- ----------------------------------------------------------------------------
181 -- {Start of Comments}
182 --
183 -- Description:
184 --   Maintains the _TL table.  Ensures there is a translation for every
185 --   installed language, removes any orphaned translation rows and
186 --   corrects and translations which have got out of synchronisation.
187 --
188 -- Pre-requisites:
189 --
190 -- In Parameters:
191 --
192 -- Post Success:
193 --  A translation row exists for every installed language.
194 --
195 -- Post Failure:
196 --  Maintenance is aborted.
197 --
198 -- Developer Implementation Notes:
199 --  None.
200 --
201 -- Access Status:
202 --  Internal Development Use Only.
203 --
204 -- {End of Comments}
205 -- ----------------------------------------------------------------------------
206 Procedure add_language;
207 --
208 -- ----------------------------------------------------------------------------
209 -- |-----------------------------< convert_args >-----------------------------|
210 -- ----------------------------------------------------------------------------
211 -- {Start Of Comments}
212 --
213 -- Description:
214 --   This function is used to turn attribute parameters into the record
215 --   structure parameter g_rec_type.
216 --
217 -- Prerequisites:
218 --   This is a private function and can only be called from the ins or upd
219 --   attribute processes.
220 --
221 -- In Parameters:
222 --
223 -- Post Success:
224 --   A returning record structure will be returned.
225 --
226 -- Post Failure:
227 --   No direct error handling is required within this function.  Any possible
228 --   errors within this function will be a PL/SQL value error due to
229 --   conversion of datatypes or data lengths.
230 --
231 -- Developer Implementation Notes:
232 --   None.
233 --
234 -- Access Status:
235 --   Internal Row Handler Use Only.
236 --
237 -- {End Of Comments}
238 -- ----------------------------------------------------------------------------
239 Function convert_args
240   (p_learning_path_id               in number
241   ,p_language                       in varchar2
242   ,p_name                           in varchar2
243   ,p_description                    in varchar2
244   ,p_objectives                     in varchar2
245   ,p_purpose                        in varchar2
246   ,p_keywords                       in varchar2
247   ,p_source_lang                    in varchar2
248   )
249   Return g_rec_type;
250 --
251 end ota_lpt_shd;