DBA Data[Home] [Help]

PACKAGE: APPS.IRC_CMP_SHD

Source


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