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