DBA Data[Home] [Help]

PACKAGE: APPS.HR_INT_SHD

Source


1 Package hr_int_shd as
2 /* $Header: hrintrhi.pkh 120.0 2005/05/31 00:52:48 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (integration_id                  number(15)
10   ,integration_key                 varchar2(100)
11   ,party_type                      varchar2(240)
12   ,party_name                      varchar2(360)
13   ,party_site_name                 varchar2(904)
14   ,transaction_type                varchar2(100)
15   ,transaction_subtype             varchar2(100)
16   ,standard_code                   varchar2(30)
17   ,ext_trans_type                  varchar2(100)
18   ,ext_trans_subtype               varchar2(100)
19   ,trans_direction                 varchar2(20)
20   ,url                             varchar2(2000)
21   ,synched                         varchar2(9)       -- Increased length
22   ,ext_application_id              number(15)
23   ,application_name                varchar2(80)
24   ,application_type                varchar2(80)
25   ,application_url                 varchar2(1000)
26   ,logout_url                      varchar2(1000)
27   ,user_field                      varchar2(80)
28   ,password_field                  varchar2(80)
29   ,authentication_needed           varchar2(80)
30   ,field_name1                     varchar2(80)
31   ,field_value1                    varchar2(1000)
32   ,field_name2                     varchar2(80)
33   ,field_value2                    varchar2(1000)
34   ,field_name3                     varchar2(80)
35   ,field_value3                    varchar2(1000)
36   ,field_name4                     varchar2(80)
37   ,field_value4                    varchar2(1000)
38   ,field_name5                     varchar2(80)
39   ,field_value5                    varchar2(1000)
40   ,field_name6                     varchar2(80)
41   ,field_value6                    varchar2(1000)
42   ,field_name7                     varchar2(80)
43   ,field_value7                    varchar2(1000)
44   ,field_name8                     varchar2(80)
45   ,field_value8                    varchar2(1000)
46   ,field_name9                     varchar2(80)
47   ,field_value9                    varchar2(1000)
48   ,object_version_number           number(9)
49   );
50 --
51 -- ----------------------------------------------------------------------------
52 -- |           Global Definitions - Internal Development Use Only             |
53 -- ----------------------------------------------------------------------------
54 --
55 g_old_rec  g_rec_type;                            -- Global record definition
56 -- Global table name
57 g_tab_nam  constant varchar2(30) := 'HR_KI_INTEGRATIONS';
58 --
59 -- ----------------------------------------------------------------------------
60 -- |---------------------------< constraint_error >---------------------------|
61 -- ----------------------------------------------------------------------------
62 -- {Start Of Comments}
63 --
64 -- Description:
65 --   This procedure is called when a constraint has been violated (i.e.
66 --   The exception hr_api.check_integrity_violated,
67 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
68 --   hr_api.unique_integrity_violated has been raised).
69 --   The exceptions can only be raised as follows:
70 --   1) A check constraint can only be violated during an INSERT or UPDATE
71 --      dml operation.
72 --   2) A parent integrity constraint can only be violated during an
73 --      INSERT or UPDATE dml operation.
74 --   3) A child integrity constraint can only be violated during an
75 --      DELETE dml operation.
76 --   4) A unique integrity constraint can only be violated during INSERT or
77 --      UPDATE dml operation.
78 --
79 -- Prerequisites:
80 --   1) Either hr_api.check_integrity_violated,
81 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
82 --      hr_api.unique_integrity_violated has been raised with the subsequent
83 --      stripping of the constraint name from the generated error message
84 --      text.
85 --   2) Standalone validation test which corresponds with a constraint error.
86 --
87 -- In Parameter:
88 --   p_constraint_name is in upper format and is just the constraint name
89 --   (e.g. not prefixed by brackets, schema owner etc).
90 --
91 -- Post Success:
92 --   Development dependant.
93 --
94 -- Post Failure:
95 --   Developement dependant.
96 --
97 -- Developer Implementation Notes:
98 --   For each constraint being checked the hr system package failure message
99 --   has been generated as a template only. These system error messages should
100 --   be modified as required (i.e. change the system failure message to a user
101 --   friendly defined error message).
102 --
103 -- Access Status:
104 --   Internal Development Use Only.
105 --
106 -- {End Of Comments}
107 -- ----------------------------------------------------------------------------
108 Procedure constraint_error
109   (p_constraint_name in all_constraints.constraint_name%TYPE);
110 --
111 -- ----------------------------------------------------------------------------
112 -- |-----------------------------< api_updating >-----------------------------|
113 -- ----------------------------------------------------------------------------
114 --  {Start Of Comments}
115 --
116 -- Description:
117 --   This function is used to populate the g_old_rec record with the
118 --   current row from the database for the specified primary key
119 --   provided that the primary key exists and is valid and does not
120 --   already match the current g_old_rec. The function will always return
121 --   a TRUE value if the g_old_rec is populated with the current row.
122 --   A FALSE value will be returned if all of the primary key arguments
123 --   are null.
124 --
125 -- Prerequisites:
126 --   None.
127 --
128 -- In Parameters:
129 --
130 -- Post Success:
131 --   A value of TRUE will be returned indiciating that the g_old_rec
132 --   is current.
133 --   A value of FALSE will be returned if all of the primary key arguments
134 --   have a null value (this indicates that the row has not be inserted into
135 --   the Schema), and therefore could never have a corresponding row.
136 --
137 -- Post Failure:
138 --   A failure can only occur under two circumstances:
139 --   1) The primary key is invalid (i.e. a row does not exist for the
140 --      specified primary key values).
141 --   2) If an object_version_number exists but is NOT the same as the current
142 --      g_old_rec value.
143 --
144 -- Developer Implementation Notes:
145 --   None.
146 --
147 -- Access Status:
148 --   Internal Development Use Only.
149 --
150 -- {End Of Comments}
151 -- ----------------------------------------------------------------------------
152 Function api_updating
153   (p_integration_id                       in     number
154   ,p_object_version_number                in     number
155   )      Return Boolean;
156 --
157 -- ----------------------------------------------------------------------------
158 -- |---------------------------------< lck >----------------------------------|
159 -- ----------------------------------------------------------------------------
160 -- {Start of comments}
161 --
162 -- Description:
163 --   The Lck process has two main functions to perform. Firstly, the row to be
164 --   updated or deleted must be locked. The locking of the row will only be
165 --   successful if the row is not currently locked by another user.
166 --   Secondly, during the locking of the row, the row is selected into
167 --   the g_old_rec data structure which enables the current row values from
168 --   the server to be available to the api.
169 --
170 -- Prerequisites:
171 --   When attempting to call the lock the object version number (if defined)
172 --   is mandatory.
173 --
174 -- In Parameters:
175 --   The arguments to the Lck process are the primary key(s) which uniquely
176 --   identify the row and the object version number of row.
177 --
178 -- Post Success:
179 --   On successful completion of the Lck process the row to be updated or
180 --   deleted will be locked and selected into the global data structure
181 --   g_old_rec.
182 --
183 -- Post Failure:
184 --   The Lck process can fail for three reasons:
185 --   1) When attempting to lock the row the row could already be locked by
186 --      another user. This will raise the HR_Api.Object_Locked exception.
187 --   2) The row which is required to be locked doesn't exist in the HR Schema.
188 --      This error is trapped and reported using the message name
189 --      'HR_7220_INVALID_PRIMARY_KEY'.
190 --   3) The row although existing in the HR Schema has a different object
191 --      version number than the object version number specified.
192 --      This error is trapped and reported using the message name
193 --      'HR_7155_OBJECT_INVALID'.
194 --
195 -- Developer Implementation Notes:
196 --   For each primary key and the object version number arguments add a
197 --   call to hr_api.mandatory_arg_error procedure to ensure that these
198 --   argument values are not null.
199 --
200 -- Access Status:
201 --   Internal Development Use Only.
202 --
203 -- {End of comments}
204 -- ----------------------------------------------------------------------------
205 Procedure lck
206   (p_integration_id                       in     number
207   ,p_object_version_number                in     number
208   );
209 --
210 -- ----------------------------------------------------------------------------
211 -- |-----------------------------< convert_args >-----------------------------|
212 -- ----------------------------------------------------------------------------
213 -- {Start Of Comments}
214 --
215 -- Description:
216 --   This function is used to turn attribute parameters into the record
217 --   structure parameter g_rec_type.
218 --
219 -- Prerequisites:
220 --   This is a private function and can only be called from the ins or upd
221 --   attribute processes.
222 --
223 -- In Parameters:
224 --
225 -- Post Success:
226 --   A returning record structure will be returned.
227 --
228 -- Post Failure:
229 --   No direct error handling is required within this function.  Any possible
230 --   errors within this function will be a PL/SQL value error due to
231 --   conversion of datatypes or data lengths.
232 --
233 -- Developer Implementation Notes:
234 --   None.
235 --
236 -- Access Status:
237 --   Internal Row Handler Use Only.
238 --
239 -- {End Of Comments}
240 -- ----------------------------------------------------------------------------
241 Function convert_args
242   (p_integration_id                 in number
243   ,p_integration_key                in varchar2
244   ,p_party_type                     in varchar2
245   ,p_party_name                     in varchar2
246   ,p_party_site_name                in varchar2
247   ,p_transaction_type               in varchar2
248   ,p_transaction_subtype            in varchar2
249   ,p_standard_code                  in varchar2
250   ,p_ext_trans_type                 in varchar2
251   ,p_ext_trans_subtype              in varchar2
252   ,p_trans_direction                in varchar2
253   ,p_url                            in varchar2
254   ,p_synched                        in varchar2
255   ,p_ext_application_id             in number
256   ,p_application_name               in varchar2
257   ,p_application_type               in varchar2
258   ,p_application_url                in varchar2
259   ,p_logout_url                     in varchar2
260   ,p_user_field                     in varchar2
261   ,p_password_field                 in varchar2
265   ,p_field_name2                    in varchar2
262   ,p_authentication_needed          in varchar2
263   ,p_field_name1                    in varchar2
264   ,p_field_value1                   in varchar2
266   ,p_field_value2                   in varchar2
267   ,p_field_name3                    in varchar2
268   ,p_field_value3                   in varchar2
269   ,p_field_name4                    in varchar2
270   ,p_field_value4                   in varchar2
271   ,p_field_name5                    in varchar2
272   ,p_field_value5                   in varchar2
273   ,p_field_name6                    in varchar2
274   ,p_field_value6                   in varchar2
275   ,p_field_name7                    in varchar2
276   ,p_field_value7                   in varchar2
277   ,p_field_name8                    in varchar2
278   ,p_field_value8                   in varchar2
279   ,p_field_name9                    in varchar2
280   ,p_field_value9                   in varchar2
281   ,p_object_version_number          in number
282   )
283   Return g_rec_type;
284 --
285 end hr_int_shd;