DBA Data[Home] [Help]

PACKAGE: APPS.HR_CALENDAR_NODE_TYPE_API

Source


1 Package HR_CALENDAR_NODE_TYPE_API as
2 /* $Header: pepgtapi.pkh 120.0 2005/05/31 14:14:44 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------< create_node_type >---------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This API creates a generic hierarchy node type that is used for constructing
11 --   HRMS Calendar specifc generic hierarchy. It should not be used to create
12 --   other types of node type hierarchy nodes as it also creates lookup values
13 --   that are associated with calendar node types only.
14 --
15 --
16 -- Prerequisites:
17 --
18 -- In Parameters:
19 --   Name                           Reqd Type     Description
20 --   p_validate                          boolean  If true, the database
21 --                                                remains unchanged. If false,
22 --                                                the node type is created.
23 --   p_effective_date               Yes  date     Application effective date.
24 --   p_hierarchy_type               Yes  varchar2 The type of hierarchy to which
25 --                                                the node will belong.
26 --   p_child_node_name              Yes  varchar2 The name of the node.
27 --   p_child_value_set              Yes  varchar2 The id of the valueset supplying
28 --                                                values for the node.
29 --   p_child_node_type                   varchar2 The lookup code of the node.
30 --   p_parent_node_type                  varchar2 The lookup code of the parent node.
31 --   p_description                       varchar2 Description of the node type.
32 --
33 -- Post Success:
34 --   The generic hierarchy node type record is created and the API sets the following out
35 --   parameters.
36 --
37 --   Name                           Type     Description
38 --   p_hier_node_type_id            number   If p_validate is false, uniquely
39 --                                           identifies the node type created.
40 --                                           If p_validate is true, set to
41 --                                           null.
42 --   p_object_version_number        number   If p_validate is false, set to
43 --                                           the version number of this
44 --                                           node type.
45 --                                           If p_validate is true, set to
46 --                                           null.
47 --
48 -- Post Failure:
49 --   The API does not create the generic hierarchy node type record and raises an error.
50 --
51 -- Access Status:
52 --   Public.
53 --
54 -- {End Of Comments}
55 --
56 
57 procedure create_node_type
58   (p_validate                      in     boolean  default false
59   ,p_effective_date                in     date
60   ,p_hierarchy_type                in     varchar2
61   ,p_child_node_name               in     varchar2
62   ,p_child_value_set               in     varchar2
63   ,p_child_node_type               in     varchar2 default null
64   ,p_parent_node_type              in     varchar2 default null
65   ,p_description                   in     varchar2 default null
66   ,p_hier_node_type_id                out nocopy  number
67   ,p_object_version_number            out nocopy  number
68   );
69 
70 --
71 -- ----------------------------------------------------------------------------
72 -- |-------------------------< update_node_type >--------------------------|
73 -- ----------------------------------------------------------------------------
74 -- {Start Of Comments}
75 --
76 -- Description:
77 --   This API updates a generic hierarchy node type that is used for constructing
78 --   HRMS Calendar specifc generic hierarchy, as identified by p_hier_node_type_id.
79 --   It should not be used to update other types of node type hierarchy data as
80 --   it also updates lookup values that are associated with calendar node types
81 --   only.
82 --
83 -- Prerequisites:
84 --   The node type record identified by p_hier_node_type_id and
85 --   p_object_version_number must exist.
86 --
87 -- In Parameters:
88 --   Name                           Reqd Type     Description
89 --   p_validate                          boolean  If true, the database
90 --                                                remains unchanged. If false,
91 --                                                the node type  is updated.
92 --   p_effective_date               Yes  date     Application effective date.
93 --   p_hier_node_type_id            Yes  number   Surrogate id of the node type
94 --   p_object_version_number        Yes  number   Version number of the node type record.
95 --   p_child_node_name                   varchar2 The name of the child node.
96 --   p_child_value_set                   varchar2 The id of the valueset supplying
97 --                                                values for the type.
98 --   p_parent_node_type                  varchar2 The type of the parent node.
99 --   p_description                       varchar2 Description of the node type.
100 --
101 -- Post Success:
102 --   The node type record and associated lookup value record is updated and the
103 --   API sets the following out parameters.
104 --
105 --   Name                           Type     Description
106 --   p_object_version_number        number   If p_validate is false, set to
107 --                                           the new version number of this
108 --                                           node type.
109 --                                           If p_validate is true, set to
110 --                                           null same value passed in.
111 --
112 -- Post Failure:
113 --   The API does not update the node type and raises an error.
114 --
115 -- Access Status:
116 --   Public.
117 --
118 -- {End Of Comments}
119 --
120 procedure update_node_type
121   (p_validate                      in     boolean  default false
122   ,p_effective_date                in     date
123   ,p_hier_node_type_id             in     number
124   ,p_object_version_number         in out nocopy  number
125   ,p_child_node_name               in     varchar2 default hr_api.g_varchar2
126   ,p_child_value_set               in     varchar2 default hr_api.g_varchar2
127   ,p_parent_node_type              in     varchar2 default hr_api.g_varchar2
128   ,p_description                   in     varchar2 default hr_api.g_varchar2
129   );
130 
131 -- ----------------------------------------------------------------------------
132 -- |----------------------------< delete_node_type >--------------------------|
133 -- ----------------------------------------------------------------------------
134 -- {Start Of Comments}
135 --
136 -- Description:
137 --   This API deletes a HRMS Calendar specifc node type record as identified by
138 --   the in parameter p_hier_node_type_id and p_object_version_number.
139 --   It should not be used to delete other node type hierarchy data as
140 --   it also attempts to delete the lookup value that is associated with
141 --   the calendar node type.
142 --
143 -- Prerequisites:
144 --   The node type as identified by the in parameter p_hier_node_type_id and the
145 --   in parameter p_object_version_number must already exist.
146 --
147 -- In Parameters:
148 --   Name                           Reqd Type     Description
149 --   p_validate                          boolean  If true, the database
150 --                                                remains unchanged. If false,
151 --                                                the node type is deleted.
152 --   p_hier_node_type_id            Yes  number   Primary key of the node type.
153 --   p_object_version_number        Yes  number   Current version of the
154 --                                                node type
155 --
156 -- Post Success:
157 --   The node type is deleted.
158 --
159 -- Post Failure:
160 --   The API does not delete the node type and raises an error.
161 --
162 -- Access Status:
163 --   Public.
164 --
165 -- {End Of Comments}
166 --
167 procedure delete_node_type
168   (p_validate                      in     boolean  default false
169   ,p_hier_node_type_id             in     number
170   ,p_object_version_number         in     number
171   );
172 --
173 --
174 -- ----------------------------------------------------------------------------
175 -- |----------------------------< get_node_level >--------------------------|
176 -- ----------------------------------------------------------------------------
177 -- {Start Of Comments}
178 --
179 -- Description:
180 -- function to return the level of a node type within a node type hierarchy.
181 --
182 -- In Parameters:
183 --                                  Reqd Type       Description
184 --   p_hierarchy_type               Yes  varchar2   Hierarchy type code.
185 --   p_child_node_type              Yes  varchar2   Child node type code.
186 --
187 -- Access Status:
188 --   Public.
189 --
190 -- {End Of Comments}
191 function get_node_level (p_hierarchy_type in VARCHAR2
192                        ,p_child_node_type IN VARCHAR2) RETURN NUMBER;
193 --
194 --
195 -- ----------------------------------------------------------------------------
196 -- |----------------------------< child_exists >--------------------------|
197 -- ----------------------------------------------------------------------------
198 -- {Start Of Comments}
199 --
200 -- Description:
201 -- Returns a Y or N code indicating if children exist for the child_node_type
202 -- within the hierarchy.
203 --
204 -- In Parameters:
205 --                                  Reqd Type       Description
206 --   p_hierarchy_type               Yes  varchar2   Hierarchy type code.
207 --   p_child_node_type              Yes  varchar2   Child node type code.
208 --
209 -- Access Status:
210 --   Public.
211 --
212 -- {End Of Comments}
213 function child_exists (p_hierarchy_type in VARCHAR2
214                       ,p_child_node_type IN VARCHAR2) RETURN VARCHAR2;
215 --
216 --
217 -- ----------------------------------------------------------------------------
218 -- |----------------------------< gen_hier_exists >--------------------------|
219 -- ----------------------------------------------------------------------------
220 -- {Start Of Comments}
221 --
222 -- Description:
223 -- Returns a Y or N code indicating if the node_type (scope) hierarchy
224 -- has been used to create a generic hierarchy.
225 --
226 -- In Parameters:
227 --                                  Reqd Type       Description
228 --   p_hierarchy_type               Yes  varchar2   Hierarchy type code.
229 --
230 -- Access Status:
231 --   Public.
232 --
233 -- {End Of Comments}
234 function gen_hier_exists (p_hierarchy_type in VARCHAR2) RETURN VARCHAR2;
235 --
236 --
237 end HR_CALENDAR_NODE_TYPE_API;