DBA Data[Home] [Help]

PACKAGE: APPS.HR_ADI_LOB_SHD

Source


1 Package hr_adi_lob_shd as
2 /* $Header: hrlobrhi.pkh 120.0 2005/05/31 01:18:56 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (file_id                         number
10   ,file_name                       varchar2(256)
11   ,file_content_type               varchar2(256)
12   ,upload_date                     date
13   ,program_name                    varchar2(32)
14   ,program_tag                     varchar2(32)
15   ,file_format                     varchar2(10)
16   );
17 --
18 -- ----------------------------------------------------------------------------
19 -- |           Global Definitions - Internal Development Use Only             |
20 -- ----------------------------------------------------------------------------
21 --
22 g_old_rec  g_rec_type;                            -- Global record definition
23 -- Global table name
24 g_tab_nam  constant varchar2(30) := 'FND_LOBS';
25 --
26 -- ----------------------------------------------------------------------------
27 -- |---------------------------< constraint_error >---------------------------|
28 -- ----------------------------------------------------------------------------
29 -- {Start Of Comments}
30 --
31 -- Description:
32 --   This procedure is called when a constraint has been violated (i.e.
33 --   The exception hr_api.check_integrity_violated,
34 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
35 --   hr_api.unique_integrity_violated has been raised).
36 --   The exceptions can only be raised as follows:
37 --   1) A check constraint can only be violated during an INSERT or UPDATE
38 --      dml operation.
39 --   2) A parent integrity constraint can only be violated during an
40 --      INSERT or UPDATE dml operation.
41 --   3) A child integrity constraint can only be violated during an
42 --      DELETE dml operation.
43 --   4) A unique integrity constraint can only be violated during INSERT or
44 --      UPDATE dml operation.
45 --
46 -- Prerequisites:
47 --   1) Either hr_api.check_integrity_violated,
48 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
49 --      hr_api.unique_integrity_violated has been raised with the subsequent
50 --      stripping of the constraint name from the generated error message
51 --      text.
52 --   2) Standalone validation test which corresponds with a constraint error.
53 --
54 -- In Parameter:
55 --   p_constraint_name is in upper format and is just the constraint name
56 --   (e.g. not prefixed by brackets, schema owner etc).
57 --
58 -- Post Success:
59 --   Development dependant.
60 --
61 -- Post Failure:
62 --   Developement dependant.
63 --
64 -- Developer Implementation Notes:
65 --   For each constraint being checked the hr system package failure message
66 --   has been generated as a template only. These system error messages should
67 --   be modified as required (i.e. change the system failure message to a user
68 --   friendly defined error message).
69 --
70 -- Access Status:
71 --   Internal Development Use Only.
72 --
73 -- {End Of Comments}
74 -- ----------------------------------------------------------------------------
75 Procedure constraint_error
76   (p_constraint_name in all_constraints.constraint_name%TYPE);
77 --
78 -- ----------------------------------------------------------------------------
79 -- |-----------------------------< api_updating >-----------------------------|
80 -- ----------------------------------------------------------------------------
81 --  {Start Of Comments}
82 --
83 -- Description:
84 --   This function is used to populate the g_old_rec record with the
85 --   current row from the database for the specified primary key
86 --   provided that the primary key exists and is valid and does not
87 --   already match the current g_old_rec. The function will always return
88 --   a TRUE value if the g_old_rec is populated with the current row.
89 --   A FALSE value will be returned if all of the primary key arguments
90 --   are null.
91 --
92 -- Prerequisites:
93 --   None.
94 --
95 -- In Parameters:
96 --
97 -- Post Success:
98 --   A value of TRUE will be returned indiciating that the g_old_rec
99 --   is current.
100 --   A value of FALSE will be returned if all of the primary key arguments
101 --   have a null value (this indicates that the row has not be inserted into
102 --   the Schema), and therefore could never have a corresponding row.
103 --
104 -- Post Failure:
105 --   A failure can only occur under two circumstances:
106 --   1) The primary key is invalid (i.e. a row does not exist for the
107 --      specified primary key values).
108 --   2) If an object_version_number exists but is NOT the same as the current
109 --      g_old_rec value.
110 --
111 -- Developer Implementation Notes:
112 --   None.
113 --
114 -- Access Status:
115 --   Internal Development Use Only.
116 --
117 -- {End Of Comments}
118 -- ----------------------------------------------------------------------------
119 Function api_updating
120   (p_file_id                              in     number
121   )      Return Boolean;
122 --
123 -- ----------------------------------------------------------------------------
124 -- |---------------------------------< lck >----------------------------------|
125 -- ----------------------------------------------------------------------------
126 -- {Start of comments}
127 --
128 -- Description:
129 --   The Lck process has two main functions to perform. Firstly, the row to be
130 --   updated or deleted must be locked. The locking of the row will only be
131 --   successful if the row is not currently locked by another user.
132 --   Secondly, during the locking of the row, the row is selected into
133 --   the g_old_rec data structure which enables the current row values from
134 --   the server to be available to the api.
135 --
136 -- Prerequisites:
137 --   When attempting to call the lock the object version number (if defined)
138 --   is mandatory.
139 --
140 -- In Parameters:
141 --   The arguments to the Lck process are the primary key(s) which uniquely
142 --   identify the row and the object version number of row.
143 --
144 -- Post Success:
145 --   On successful completion of the Lck process the row to be updated or
146 --   deleted will be locked and selected into the global data structure
147 --   g_old_rec.
148 --
149 -- Post Failure:
150 --   The Lck process can fail for three reasons:
151 --   1) When attempting to lock the row the row could already be locked by
152 --      another user. This will raise the HR_Api.Object_Locked exception.
153 --   2) The row which is required to be locked doesn't exist in the HR Schema.
154 --      This error is trapped and reported using the message name
155 --      'HR_7220_INVALID_PRIMARY_KEY'.
156 --   3) The row although existing in the HR Schema has a different object
157 --      version number than the object version number specified.
158 --      This error is trapped and reported using the message name
159 --      'HR_7155_OBJECT_INVALID'.
160 --
161 -- Developer Implementation Notes:
162 --   For each primary key and the object version number arguments add a
163 --   call to hr_api.mandatory_arg_error procedure to ensure that these
164 --   argument values are not null.
165 --
166 -- Access Status:
167 --   Internal Development Use Only.
168 --
169 -- {End of comments}
170 -- ----------------------------------------------------------------------------
171 Procedure lck
172   (p_file_id                              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
196 --   conversion 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   (p_file_id                        in number
208   ,p_file_name                      in varchar2
209   ,p_file_content_type              in varchar2
210   ,p_upload_date                    in date
211   ,p_program_name                   in varchar2
212   ,p_program_tag                    in varchar2
213   ,p_file_format                    in varchar2
214   )
215   Return g_rec_type;
216 --
217 end hr_adi_lob_shd;