1 Package ssp_ern_ins as
2 /* $Header: spernrhi.pkh 120.0.12000000.1 2007/01/17 14:14:38 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------------< ins >----------------------------------|
6 -- ----------------------------------------------------------------------------
7 --
8 -- Description:
9 -- This procedure is the record interface for the insert process
10 -- for the specified entity. The role of this process is to insert a fully
11 -- validated row, into the HR schema passing back to the calling process,
12 -- any system generated values (e.g. primary and object version number
13 -- attributes). This process is the main backbone of the ins
14 -- process. The processing of this procedure is as follows:
15 -- 1) If the p_validate parameter has been set to true then a savepoint is
16 -- issued.
17 -- 2) The controlling validation process insert_validate is then executed
18 -- which will execute all private and public validation business rule
19 -- processes.
20 -- 3) The pre_insert business process is then executed which enables any
21 -- logic to be processed before the insert dml process is executed.
22 -- 4) The insert_dml process will physical perform the insert dml into the
23 -- specified entity.
24 -- 5) The post_insert business process is then executed which enables any
25 -- logic to be processed after the insert dml process.
26 -- 6) If the p_validate parameter has been set to true an exception is
27 -- raised which is handled and processed by performing a rollback to the
28 -- savepoint which was issued at the beginning of the Ins process.
29 --
30 -- Pre Conditions:
31 -- The main parameters to the this process have to be in the record
32 -- format.
33 --
34 -- In Parameters:
35 -- p_validate
36 -- Determines if the process is to be validated. Setting this
37 -- boolean value to true will invoke the process to be validated. The
38 -- default is false. The validation is controlled by a savepoint and
39 -- rollback mechanism. The savepoint is issued at the beginning of the
40 -- process and is rollbacked at the end of the process
41 -- when all the processing has been completed. The rollback is controlled
42 -- by raising and handling the exception hr_api.validate_enabled. We use
43 -- the exception because, by raising the exception with the business
44 -- process, we can exit successfully without having any of the 'OUT'
45 -- parameters being set.
46 --
47 -- Post Success:
48 -- A fully validated row will be inserted into the specified entity
49 -- without being committed. If the p_validate parameter has been set to true
50 -- then all the work will be rolled back.
51 --
52 -- Post Failure:
53 -- If an error has occurred, an error message will be supplied with the work
54 -- rolled back.
55 --
56 -- Developer Implementation Notes:
57 -- None.
58 --
59 -- Access Status:
60 -- Internal Development Use Only.
61 --
62 -- ----------------------------------------------------------------------------
63 Procedure ins
64 (
65 p_rec in out nocopy ssp_ern_shd.g_rec_type,
66 p_validate in boolean default false
67 );
68 --
69 Procedure ins
70 (
71 p_earnings_calculations_id out nocopy number,
72 p_object_version_number out nocopy number,
73 p_person_id in number,
74 p_effective_date in date,
75 p_average_earnings_amount in out nocopy number,
76 p_validate in boolean default false
77 );
78 --
79 -- ----------------------------------------------------------------------------
80 -- |---------------------------------< ins >----------------------------------|
81 -- ----------------------------------------------------------------------------
82 --
83 -- Description:
84 -- This procedure is the attribute interface for the insert
85 -- process for the specified entity and is the outermost layer. The role
86 -- of this process is to insert a fully validated row into the HR schema
87 -- passing back to the calling process, any system generated values
88 -- (e.g. object version number attributes).The processing of this
89 -- procedure is as follows:
90 -- 1) The attributes are converted into a local record structure by
91 -- calling the convert_args function.
92 -- 2) After the conversion has taken place, the corresponding record ins
93 -- interface process is executed.
94 -- 3) OUT parameters are then set to their corresponding record attributes.
95 --
96 -- Pre Conditions:
97 --
98 -- In Parameters:
99 -- p_validate
100 -- Determines if the process is to be validated. Setting this
101 -- Boolean value to true will invoke the process to be validated.
102 -- The default is false.
103 --
104 -- Post Success:
105 -- A fully validated row will be inserted for the specified entity
106 -- without being committed (or rollbacked depending on the p_validate
107 -- status).
108 --
109 -- Post Failure:
110 -- If an error has occurred, an error message will be supplied with the work
111 -- rolled back.
112 --
113 -- Developer Implementation Notes:
114 -- None.
115 --
116 -- Access Status:
117 -- Internal Development Use Only.
118 --
119 -- ----------------------------------------------------------------------------
120 Procedure ins
121 (
122 p_earnings_calculations_id out nocopy number,
123 p_object_version_number out nocopy number,
124 p_person_id in number,
125 p_effective_date in date,
126 p_average_earnings_amount in out nocopy number,
127 p_user_entered in out nocopy varchar2,
128 p_absence_category in out nocopy varchar2,
129 p_payment_periods in out nocopy number,
130 p_validate in boolean default false
131 );
132 --
133 end ssp_ern_ins;