DBA Data[Home] [Help]

PACKAGE: APPS.PER_PSH_SHD

Source


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