DBA Data[Home] [Help]

PACKAGE: APPS.HR_FCT_SHD

Source


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