1 Package irc_iad_ins AUTHID CURRENT_USER as
2 /* $Header: iriadrhi.pkh 120.2.12010000.2 2010/01/11 10:42:09 uuddavol ship $ */
3 -- ----------------------------------------------------------------------------
4 -- |------------------------< set_base_key_value >----------------------------|
5 -- ----------------------------------------------------------------------------
6 -- {Start of Comments}
7 -- Description:
8 -- This procedure is called to register the next ID value from the database
9 -- sequence.
10 --
11 -- Prerequisites:
12 --
13 -- In Parameters:
14 -- Primary Key
15 --
16 -- Post Success:
17 --
18 -- Post Failure:
19 --
20 -- Developer Implementation Notes:
21 -- None.
22 --
23 -- Access Status:
24 -- Internal Development Use Only.
25 --
26 -- {End of Comments}
27 -- ----------------------------------------------------------------------------
28 procedure set_base_key_value
29 (p_assignment_details_id in number);
30 --
31 -- ----------------------------------------------------------------------------
32 -- |------------------------------< pre_insert >------------------------------|
33 -- ----------------------------------------------------------------------------
34 -- {Start Of Comments}
35 --
36 -- Description:
37 -- This private procedure contains any processing which is required before
38 -- the insert dml. Presently, if the entity has a corresponding primary
39 -- key which is maintained by an associating sequence, the primary key for
40 -- the entity will be populated with the next sequence value in
41 -- preparation for the insert dml.
42 -- Also, if comments are defined for this entity, the comments insert
43 -- logic will also be called, generating a comment_id if required.
44 --
45 -- Prerequisites:
46 -- This is an internal procedure which is called from the ins procedure.
47 --
48 -- In Parameters:
49 -- A Pl/Sql record structure.
50 --
51 -- Post Success:
52 -- Processing continues.
53 --
54 -- Post Failure:
55 -- If an error has occurred, an error message and exception will be raised
56 -- but not handled.
57 --
58 -- Developer Implementation Notes:
59 -- Any pre-processing required before the insert dml is issued should be
60 -- coded within this procedure. As stated above, a good example is the
61 -- generation of a primary key number via a corresponding sequence.
62 -- It is important to note that any 3rd party maintenance should be reviewed
63 -- before placing in this procedure.
64 --
65 -- Access Status:
66 -- Internal Row Handler Use Only.
67 --
68 -- {End Of Comments}
69 -- ----------------------------------------------------------------------------
70 Procedure pre_insert
71 (p_rec in out nocopy irc_iad_shd.g_rec_type
72 ,p_effective_date in date
73 ,p_datetrack_mode in varchar2
74 ,p_validation_start_date in date
75 ,p_validation_end_date in date
76 );
77 --
78 -- ----------------------------------------------------------------------------
79 -- |------------------------------< insert_dml >------------------------------|
80 -- ----------------------------------------------------------------------------
81 -- {Start Of Comments}
82 --
83 -- Description:
84 -- This procedure calls the dt_insert_dml control logic which handles
85 -- the actual datetrack dml.
86 --
87 -- Prerequisites:
88 -- This is an internal private procedure which must be called from the ins
89 -- procedure and must have all mandatory attributes set (except the
90 -- object_version_number which is initialised within the dt_insert_dml
91 -- procedure).
92 --
93 -- In Parameters:
94 -- A Pl/Sql record structure.
95 --
96 -- Post Success:
97 -- Processing contines.
98 --
99 -- Post Failure:
100 -- No specific error handling is required within this procedure.
101 --
102 -- Developer Implementation Notes:
103 -- None.
104 --
105 -- Access Status:
106 -- Internal Row Handler Use Only.
107 --
108 -- {End Of Comments}
109 -- ----------------------------------------------------------------------------
110 Procedure insert_dml
111 (p_rec in out nocopy irc_iad_shd.g_rec_type
112 ,p_effective_date in date
113 ,p_datetrack_mode in varchar2
114 ,p_validation_start_date in date
115 ,p_validation_end_date in date
116 );
117 --
118 -- ----------------------------------------------------------------------------
119 -- |---------------------------------< ins >----------------------------------|
120 -- ----------------------------------------------------------------------------
121 -- {Start Of Comments}
122 --
123 -- Description:
124 -- This procedure is the record interface for the insert process
125 -- for the specified entity. The role of this process is to insert a fully
126 -- validated row, into the HR schema passing back to the calling process,
127 -- any system generated values (e.g. primary and object version number
128 -- attributes). This process is the main backbone of the ins business
129 -- process. The processing of this procedure is as follows:
130 -- 1) We must lock parent rows (if any exist).
131 -- 2) The controlling validation process insert_validate is then executed
132 -- which will execute all private and public validation business rule
133 -- processes.
134 -- 3) The pre_insert process is then executed which enables any
135 -- logic to be processed before the insert dml process is executed.
136 -- 4) The insert_dml process will physical perform the insert dml into the
137 -- specified entity.
138 -- 5) The post_insert process is then executed which enables any
139 -- logic to be processed after the insert dml process.
140 --
141 -- Prerequisites:
142 -- The main parameters to the process have to be in the record
143 -- format.
144 --
145 -- In Parameters:
146 -- p_effective_date
147 -- Specifies the date of the datetrack insert operation.
148 --
149 -- Post Success:
150 -- A fully validated row will be inserted into the specified entity
151 -- without being committed.
152 --
153 -- Post Failure:
154 -- If an error has occurred, an error message will be raised.
155 --
156 -- Developer Implementation Notes:
157 -- None.
158 --
159 -- Access Status:
160 -- Internal Development Use Only.
161 --
162 -- {End Of Comments}
163 -- ----------------------------------------------------------------------------
164 Procedure ins
165 (p_effective_date in date
166 ,p_rec in out nocopy irc_iad_shd.g_rec_type
167 );
168 --
169 -- ----------------------------------------------------------------------------
170 -- |---------------------------------< ins >----------------------------------|
171 -- ----------------------------------------------------------------------------
172 -- {Start Of Comments}
173 --
174 -- Description:
175 -- This procedure is the attribute interface for the insert
176 -- process for the specified entity and is the outermost layer. The role
177 -- of this process is to insert a fully validated row into the HR schema
178 -- passing back to the calling process, any system generated values
179 -- (e.g. object version number attributes). The processing of this
180 -- procedure is as follows:
181 -- 1) The attributes are converted into a local record structure by
182 -- calling the convert_args function.
183 -- 2) After the conversion has taken place, the corresponding record ins
184 -- interface process is executed.
185 -- 3) OUT parameters are then set to their corresponding record attributes.
186 --
187 -- Prerequisites:
188 --
189 -- In Parameters:
190 -- p_effective_date
191 -- Specifies the date of the datetrack insert operation.
192 --
193 -- Post Success:
194 -- A fully validated row will be inserted for the specified entity
195 -- without being committed.
196 --
197 -- Post Failure:
198 -- If an error has occurred, an error message will be raised.
199 --
200 -- Developer Implementation Notes:
201 -- None.
202 --
203 -- Access Status:
204 -- Internal Development Use Only.
205 --
206 -- {End Of Comments}
207 -- ----------------------------------------------------------------------------
208 Procedure ins
209 (p_effective_date in date
210 ,p_assignment_id in number
211 ,p_attempt_id in number default null
212 ,p_qualified in varchar2
213 ,p_considered in varchar2
214 ,p_assignment_details_id out nocopy number
215 ,p_details_version out nocopy number
216 ,p_latest_details out nocopy varchar2
217 ,p_effective_start_date out nocopy date
218 ,p_effective_end_date out nocopy date
219 ,p_object_version_number out nocopy number
220 );
221 --
222 end irc_iad_ins;