DBA Data[Home] [Help]

PACKAGE: APPS.OTA_BJT_SHD

Source


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