DBA Data[Home] [Help]

PACKAGE: APPS.AME_AYL_SHD

Source


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