DBA Data[Home] [Help]

PACKAGE: APPS.HR_ABM_SHD

Source


1 Package hr_abm_shd AUTHID CURRENT_USER as
2 /* $Header: hrabmrhi.pkh 115.1 99/10/12 07:03:58 porting ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   line_id                           number(9),
11   batch_run_number                  number(9),
12   api_name                          varchar2(61),
13   status                            varchar2(30),
14   error_number                      number(9),
15   error_message                     varchar2(512),
16   extended_error_message            varchar2(2000),
17   source_row_information            varchar2(2000)
18   );
19 --
20 -- ----------------------------------------------------------------------------
21 -- |           Global Definitions - Internal Development Use Only             |
22 -- ----------------------------------------------------------------------------
23 --
24 g_old_rec  g_rec_type;                            -- Global record definition
25 g_api_dml  boolean;                               -- Global api dml status
26 --
27 -- ----------------------------------------------------------------------------
28 -- |------------------------< return_api_dml_status >-------------------------|
29 -- ----------------------------------------------------------------------------
30 -- {Start Of Comments}
31 --
32 -- Description:
33 --   This function will return the current g_api_dml private global
34 --   boolean status.
35 --   The g_api_dml status determines if at the time of the function
36 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
37 --   is being issued from within an api.
38 --   If the status is TRUE then a dml statement is being issued from
39 --   within this entity api.
40 --   This function is primarily to support database triggers which
41 --   need to maintain the object_version_number for non-supported
42 --   dml statements (i.e. dml statement issued outside of the api layer).
43 --
44 -- Pre Conditions:
45 --   None.
46 --
47 -- In Parameters:
48 --   None.
49 --
50 -- Post Success:
51 --   Processing continues.
52 --   If the function returns a TRUE value then, dml is being executed from
53 --   within this api.
54 --
55 -- Post Failure:
56 --   None.
57 --
58 -- Access Status:
59 --   Internal Table Handler Use Only.
60 --
61 -- {End Of Comments}
62 -- ----------------------------------------------------------------------------
63 Function return_api_dml_status Return Boolean;
64 --
65 -- ----------------------------------------------------------------------------
66 -- |---------------------------< constraint_error >---------------------------|
67 -- ----------------------------------------------------------------------------
68 -- {Start Of Comments}
69 --
70 -- Description:
71 --   This procedure is called when a constraint has been violated (i.e.
72 --   The exception hr_api.check_integrity_violated,
73 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
74 --   hr_api.unique_integrity_violated has been raised).
75 --   The exceptions can only be raised as follows:
76 --   1) A check constraint can only be violated during an INSERT or UPDATE
77 --      dml operation.
78 --   2) A parent integrity constraint can only be violated during an
79 --      INSERT or UPDATE dml operation.
80 --   3) A child integrity constraint can only be violated during an
81 --      DELETE dml operation.
82 --   4) A unique integrity constraint can only be violated during INSERT or
83 --      UPDATE dml operation.
84 --
85 -- Pre Conditions:
86 --   1) Either hr_api.check_integrity_violated,
87 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
88 --      hr_api.unique_integrity_violated has been raised with the subsequent
89 --      stripping of the constraint name from the generated error message
90 --      text.
91 --   2) Standalone validation test which corresponds with a constraint error.
92 --
93 -- In Parameter:
94 --   p_constraint_name is in upper format and is just the constraint name
95 --   (e.g. not prefixed by brackets, schema owner etc).
96 --
97 -- Post Success:
98 --   Development dependant.
99 --
100 -- Post Failure:
101 --   Developement dependant.
102 --
103 -- Developer Implementation Notes:
104 --   For each constraint being checked the hr system package failure message
105 --   has been generated as a template only. These system error messages should
106 --   be modified as required (i.e. change the system failure message to a user
107 --   friendly defined error message).
108 --
109 -- Access Status:
110 --   Internal Development Use Only.
111 --
112 -- {End Of Comments}
113 -- ----------------------------------------------------------------------------
114 Procedure constraint_error
115             (p_constraint_name in all_constraints.constraint_name%TYPE);
116 --
117 -- ----------------------------------------------------------------------------
118 -- |---------------------------------< lck >----------------------------------|
119 -- ----------------------------------------------------------------------------
120 -- {Start Of Comments}
121 --
122 -- Description:
123 --   The Lck process has two main functions to perform. Firstly, the row to be
124 --   updated or deleted must be locked. The locking of the row will only be
125 --   successful if the row is not currently locked by another user.
126 --   Secondly, during the locking of the row, the row is selected into
127 --   the g_old_rec data structure which enables the current row values from the
128 --   server to be available to the api.
129 --
130 -- Pre Conditions:
131 --   When attempting to call the lock the object version number (if defined)
132 --   is mandatory.
133 --
134 -- In Parameters:
135 --   The arguments to the Lck process are the primary key(s) which uniquely
136 --   identify the row and the object version number of row.
137 --
138 -- Post Success:
139 --   On successful completion of the Lck process the row to be updated or
140 --   deleted will be locked and selected into the global data structure
141 --   g_old_rec.
142 --
143 -- Post Failure:
144 --   The Lck process can fail for three reasons:
145 --   1) When attempting to lock the row the row could already be locked by
146 --      another user. This will raise the HR_Api.Object_Locked exception.
147 --   2) The row which is required to be locked doesn't exist in the HR Schema.
148 --      This error is trapped and reported using the message name
149 --      'HR_7220_INVALID_PRIMARY_KEY'.
150 --   3) The row although existing in the HR Schema has a different object
151 --      version number than the object version number specified.
152 --      This error is trapped and reported using the message name
153 --      'HR_7155_OBJECT_INVALID'.
154 --
155 -- Developer Implementation Notes:
156 --   For each primary key and the object version number arguments add a
157 --   call to hr_api.mandatory_arg_error procedure to ensure that these
158 --   argument values are not null.
159 --
160 -- Access Status:
161 --   Internal Development Use Only.
162 --
163 -- {End Of Comments}
164 -- ----------------------------------------------------------------------------
165 Procedure lck (p_line_id in number);
166 --
167 -- ----------------------------------------------------------------------------
168 -- |-----------------------------< convert_args >-----------------------------|
169 -- ----------------------------------------------------------------------------
170 -- {Start Of Comments}
171 --
172 -- Description:
173 --   This function is used to turn attribute parameters into the record
174 --   structure parameter g_rec_type.
175 --
176 -- Pre Conditions:
177 --   This is a private function and can only be called from the ins or upd
178 --   attribute processes.
179 --
180 -- In Parameters:
181 --
182 -- Post Success:
183 --   A returning record structure will be returned.
184 --
185 -- Post Failure:
186 --   No direct error handling is required within this function. Any possible
187 --   errors within this function will be a PL/SQL value error due to conversion
188 --   of datatypes or data lengths.
189 --
190 -- Developer Implementation Notes:
191 --   None.
192 --
193 -- Access Status:
194 --   Internal Table Handler Use Only.
195 --
196 -- {End Of Comments}
197 -- ----------------------------------------------------------------------------
198 Function convert_args
199 	(
200 	p_line_id                       in number,
201 	p_batch_run_number              in number,
202 	p_api_name                      in varchar2,
203 	p_status                        in varchar2,
204 	p_error_number                  in number,
205 	p_error_message                 in varchar2,
206 	p_extended_error_message        in varchar2,
207 	p_source_row_information        in varchar2
208 	)
209 	Return g_rec_type;
210 --
211 end hr_abm_shd;