DBA Data[Home] [Help]

PACKAGE: APPS.PSP_PEE_SHD

Source


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