DBA Data[Home] [Help]

PACKAGE: APPS.PQH_CEP_SHD

Source


1 Package pqh_cep_shd as
2 /* $Header: pqceprhi.pkh 120.0 2005/05/29 01:40:51 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   copy_entity_pref_id               number(15),
11   table_route_id                    number(15),
12   copy_entity_txn_id                number(15),
13   select_flag                       varchar2(30),
14   object_version_number             number(9)
15   );
16 --
17 -- ----------------------------------------------------------------------------
18 -- |           Global Definitions - Internal Development Use Only             |
19 -- ----------------------------------------------------------------------------
20 --
21 g_old_rec  g_rec_type;                            -- Global record definition
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   (
117   p_copy_entity_pref_id                in number,
118   p_object_version_number              in number
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 the
132 --   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   (
171   p_copy_entity_pref_id                in number,
172   p_object_version_number              in number
173   );
174 --
175 -- ----------------------------------------------------------------------------
176 -- |-----------------------------< convert_args >-----------------------------|
177 -- ----------------------------------------------------------------------------
178 -- {Start Of Comments}
179 --
180 -- Description:
181 --   This function is used to turn attribute parameters into the record
182 --   structure parameter g_rec_type.
183 --
184 -- Prerequisites:
185 --   This is a private function and can only be called from the ins or upd
186 --   attribute processes.
187 --
188 -- In Parameters:
189 --
190 -- Post Success:
191 --   A returning record structure will be returned.
192 --
193 -- Post Failure:
194 --   No direct error handling is required within this function. Any possible
195 --   errors within this function will be a PL/SQL value error due to conversion
196 --   of datatypes or data lengths.
197 --
198 -- Developer Implementation Notes:
199 --   None.
200 --
201 -- Access Status:
202 --   Internal Row Handler Use Only.
203 --
204 -- {End Of Comments}
205 -- ----------------------------------------------------------------------------
206 Function convert_args
207 	(
208 	p_copy_entity_pref_id           in number,
209 	p_table_route_id                in number,
210 	p_copy_entity_txn_id            in number,
211 	p_select_flag                   in varchar2,
212 	p_object_version_number         in number
213 	)
214 	Return g_rec_type;
215 --
216 end pqh_cep_shd;