DBA Data[Home] [Help]

PACKAGE: APPS.PER_ZA_AO_ASS_SHD

Source


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