DBA Data[Home] [Help]

PACKAGE: APPS.PER_ADD_DEL

Source


1 Package per_add_del as
2 /* $Header: peaddrhi.pkh 120.0.12010000.1 2008/07/28 04:03:04 appldev ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------------< del >----------------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This procedure is the record interface for the delete business process
11 --   for the specified entity. The role of this process is to delete the
12 --   row from the HR schema. This process is the main backbone of the del
13 --   business process. The processing of this procedure is as follows:
14 --   1) If the p_validate argument has been set to true then a savepoint is
15 --      issued.
16 --   2) The controlling validation process delete_validate is then executed
17 --      which will execute all private and public validation business rule
18 --      processes.
19 --   3) The pre_delete business process is then executed which enables any
20 --      logic to be processed before the delete dml process is executed.
21 --   4) The delete_dml process will physical perform the delete dml for the
22 --      specified row.
23 --   5) The post_delete business process is then executed which enables any
24 --      logic to be processed after the delete dml process.
25 --   6) If the p_validate argument has been set to true an exception is raised
26 --      which is handled and processed by performing a rollback to the
27 --      savepoint which was issued at the beginning of the del process.
28 --
29 -- Pre Conditions:
30 --   The main arguments to the business process have to be in the record
31 --   format.
32 --
33 -- In Arguments:
34 --   p_validate
35 --     Determines if the business process is to be validated. Setting this
36 --     boolean value to true will invoke the process to be validated. The
37 --     default is false. The validation is controlled by a savepoint and
38 --     rollback mechanism. The savepoint is issued at the beginning of the
39 --     business process and is rollbacked at the end of the business process
40 --     when all the processing has been completed. The rollback is controlled
41 --     by raising and handling the exception hr_api.validate_enabled. We use
42 --     the exception because, by raising the exception with the business
43 --     process, we can exit successfully without having any of the 'OUT'
44 --     arguments being set.
45 --   p_rec
46 --     The only components which must be set in the record structure are
47 --     the primary key (p_rec.address_id) and the address object version
48 --     number (p_rec.object_version_number).
49 --
50 -- Post Success:
51 --   The specified row will be fully validated and deleted for the specified
52 --   entity without being committed. If the p_validate argument has been set
53 --   to true then all the work will be rolled back.
54 --
55 -- Post Failure:
56 --   If an error has occurred, an error message will be supplied with the work
57 --   rolled back. A failure will occur if any of the business rules /
58 --   conditions are found :
59 --     1) If the address being deleted is a primary address then a failure
60 --        will occur if non-primary addresses exist within the primary's
61 --        date range.
62 --
63 -- Access Status:
64 --   Internal Development Use Only.
65 --
66 -- {End Of Comments}
67 -- ----------------------------------------------------------------------------
68 Procedure del
69   (
70   p_rec	      in out nocopy per_add_shd.g_rec_type,
71   p_validate  in boolean default false
72   );
73 --
74 -- ----------------------------------------------------------------------------
75 -- |---------------------------------< del >----------------------------------|
76 -- ----------------------------------------------------------------------------
77 -- {Start Of Comments}
78 --
79 -- Description:
80 --   This procedure is the attribute interface for the delete business
81 --   process for the specified entity and is the outermost layer. The role
82 --   of this process is to validate and delete the specified row from the
83 --   HR schema. The processing of this procedure is as follows:
84 --   1) The attributes are converted into a local record structure by
85 --      explicitly coding the attribute arguments into the g_rec_type
86 --      datatype.
87 --   2) After the conversion has taken place, the corresponding record del
88 --      interface business process is executed.
89 --
90 -- Pre Conditions:
91 --
92 -- In Arguments:
93 --   p_validate
94 --     Determines if the business process is to be validated. Setting this
95 --     Boolean value to true will invoke the process to be validated.
96 --     The default is false.
97 --   p_address_id
98 --     Set the primary key of the address
99 --   p_object_version_number
100 --     Set the current object version number of the address.
101 --
102 -- Post Success:
103 --   The specified row will be fully validated and deleted for the specified
104 --   entity without being committed (or rollbacked depending on the
105 --   p_validate status).
106 --
107 -- Post Failure:
108 --   If an error has occurred, an error message will be supplied with the work
109 --   rolled back. Refer to the del record interface for details of possible
110 --   failures.
111 --
112 -- Access Status:
113 --   Internal Development Use Only.
114 --
115 -- {End Of Comments}
116 -- ----------------------------------------------------------------------------
117 Procedure del
118   (
119   p_address_id                         in number,
120   p_object_version_number              in number,
121   p_validate                           in boolean default false
122   );
123 --
124 end per_add_del;