DBA Data[Home] [Help]

PACKAGE: APPS.PER_SST_SHD

Source


1 Package per_sst_shd as
2 /* $Header: pesstrhi.pkh 120.1 2006/06/07 23:04:52 ndorai noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (setup_sub_task_code             varchar2(60)
10   ,language                        varchar2(9)       -- Increased length
11   ,source_lang                     varchar2(9)       -- Increased length
12   ,setup_sub_task_name             varchar2(240)
13   ,setup_sub_task_description      varchar2(240)
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) := 'PER_RI_SETUP_SUB_TASKS_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_setup_sub_task_code                  in     varchar2
119   )      Return Boolean;
120 --
121 -- ----------------------------------------------------------------------------
122 -- |---------------------------------< lck >----------------------------------|
123 -- ----------------------------------------------------------------------------
124 -- {Start of comments}
125 --
126 -- Description:
127 --   The Lck process has two main functions to perform. Firstly, the row to be
128 --   updated or deleted must be locked. The locking of the row will only be
129 --   successful if the row is not currently locked by another user.
130 --   Secondly, during the locking of the row, the row is selected into
131 --   the g_old_rec data structure which enables the current row values from
132 --   the server to be available to the api.
133 --
134 -- Prerequisites:
135 --   When attempting to call the lock the object version number (if defined)
136 --   is mandatory.
137 --
138 -- In Parameters:
139 --   The arguments to the Lck process are the primary key(s) which uniquely
140 --   identify the row and the object version number of row.
141 --
142 -- Post Success:
143 --   On successful completion of the Lck process the row to be updated or
144 --   deleted will be locked and selected into the global data structure
145 --   g_old_rec.
146 --
147 -- Post Failure:
148 --   The Lck process can fail for three reasons:
149 --   1) When attempting to lock the row the row could already be locked by
150 --      another user. This will raise the HR_Api.Object_Locked exception.
151 --   2) The row which is required to be locked doesn't exist in the HR Schema.
152 --      This error is trapped and reported using the message name
153 --      'HR_7220_INVALID_PRIMARY_KEY'.
154 --   3) The row although existing in the HR Schema has a different object
155 --      version number than the object version number specified.
156 --      This error is trapped and reported using the message name
157 --      'HR_7155_OBJECT_INVALID'.
158 --
159 -- Developer Implementation Notes:
160 --   For each primary key and the object version number arguments add a
161 --   call to hr_api.mandatory_arg_error procedure to ensure that these
162 --   argument values are not null.
163 --
164 -- Access Status:
165 --   Internal Development Use Only.
166 --
167 -- {End of comments}
168 -- ----------------------------------------------------------------------------
169 Procedure lck
170   (p_setup_sub_task_code                  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
224 --   conversion 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_setup_sub_task_code            in varchar2
236   ,p_language                       in varchar2
237   ,p_source_lang                    in varchar2
238   ,p_setup_sub_task_name            in varchar2
239   ,p_setup_sub_task_description     in varchar2
240   )
241   Return g_rec_type;
242 --
243 end per_sst_shd;