DBA Data[Home] [Help]

PACKAGE: APPS.PA_JOB_UTILS

Source


1 PACKAGE pa_job_utils AUTHID CURRENT_USER AS
2 -- $Header: PAJBUTLS.pls 120.3 2007/11/19 15:43:49 rthumma ship $
3 
4 --
5 --  PROCEDURE
6 --              Check_JobName_Or_Id
7 --  PURPOSE
8 --              This procedure does the following
9 --              If Job name is passed converts it to the id
10 --		If Job Id is passed,
11 --		based on the check_id_flag validates it
12 --  HISTORY
13 --   27-JUN-2000      P.Bandla		       Created
14 --
15  PROCEDURE Check_JobName_Or_Id (
16 			 p_job_id		IN	NUMBER,
17 			 p_job_name		IN	VARCHAR2,
18 			 p_check_id_flag	IN	VARCHAR2,
19 			 p_job_group_id         IN      NUMBER := NULL, -- 5130421
20 			 x_job_id		OUT	NOCOPY NUMBER, --File.Sql.39 bug 4440895
21 			 x_return_status	OUT	NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
22 			 x_error_message_code	OUT	NOCOPY VARCHAR2); --File.Sql.39 bug 4440895
23 --
24 --  PROCEDURE
25 --              Check_JobLevel
26 --  PURPOSE
27 --              This procedure validates the job level.
28 --  HISTORY
29 --   04-AUG-2000      P.Bandla	 Created
30 --
31  PROCEDURE Check_JobLevel (
32 			 p_level		IN	NUMBER,
33 			 x_valid		OUT	NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
34 			 x_return_status	OUT	NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
35 			 x_error_message_code	OUT	NOCOPY VARCHAR2); --File.Sql.39 bug 4440895
36 --
37 --  PROCEDURE
38 --              Check_Job_GroupName_Or_Id
39 --  PURPOSE
40 --              This procedure validates the job group.
41 --  HISTORY
42 --   21-NOV-2000      P.Bandla	 Created
43 --
44  PROCEDURE Check_Job_GroupName_Or_Id(
45 			p_job_group_id		IN	NUMBER,
46 			p_job_group_name	IN	VARCHAR2,
47 			p_check_id_flag		IN	VARCHAR2,
48 			x_job_group_id		OUT	NOCOPY NUMBER, --File.Sql.39 bug 4440895
49 			x_return_status		OUT	NOCOPY VARCHAR2, --File.Sql.39 bug 4440895
50 			x_error_message_code	OUT	NOCOPY VARCHAR2 ); --File.Sql.39 bug 4440895
51 
52 --
53 -- Procedure
54 -- created by Ranga Iyengar  : 05-DEC-2000
55 -- This Api validates the given job_id and job_group_id is a part of
56 -- the pa_job_relationships entity.the IN parameters will be job_id and
57 -- job_group_id
58 --
59 PROCEDURE validate_job_relationship
60             ( p_job_id             IN  per_jobs.job_id%type
61              ,p_job_group_id       IN  per_jobs.job_group_id%type
62              ,x_return_status      OUT NOCOPY varchar2 --File.Sql.39 bug 4440895
63              ,x_error_message_code OUT NOCOPY varchar2 --File.Sql.39 bug 4440895
64             );
65 
66 
67 -- This Function returns the job level(sequence) based on the job_id
68 -- and Job_group_id
69 FUNCTION get_job_level(P_job_id         IN   per_jobs.job_id%type
70                       ,P_job_group_id   IN  per_job_groups.job_group_id%type)
71 RETURN NUMBER;
72 
73 -- This function returns the Job Level of the job passed in
74 -- by looking at the 'Project Job Level' DFF segmeent of the
75 -- 'Job Category' DFF.
76 --------------------------------------------------------------------------------
77 
78 FUNCTION get_job_level(p_job_id IN NUMBER)
79 RETURN NUMBER;
80 
81 
82 -- This Function returns boolean value of true if a job is master job otherwise
83 -- it returns false -- IN parameter will be job_id
84 FUNCTION check_master_job(P_job_id  IN per_Jobs.job_id%type)
85 RETURN  boolean;
86 
87 
88 -- This API returns the job group id for the corresponding Job
89 FUNCTION get_job_group_id(P_job_id  IN   per_jobs.job_id%type)
90 RETURN per_job_groups.job_group_id%type;
91 
92 
93 -- This function checks if a Project Resource Job Group Exists
94 -- in the system. Returns 'Y' if it does and returns 'N' if it does not
95 FUNCTION Proj_Res_Job_Group_Exists(p_job_id IN NUMBER)
96 RETURN VARCHAR2;
97 
98 
99 -- This function checks if a job group passed in is a
100 -- Project Resource Job Group.
101 -- Returns 'Y' if it is and returns 'N' if it is not
102 Function Is_Proj_Res_Job_Group(p_job_id       IN NUMBER,
103                                p_job_group_id IN NUMBER)
104 RETURN VARCHAR2;
105 
106 
107 -- This function returns the project resource job group in the system
108 Function Get_Proj_Res_Job_Group(p_job_id IN NUMBER)
109 RETURN NUMBER;
110 
111 
112 FUNCTION get_job_name (P_job_id       IN  per_jobs.job_id%type,
113                        P_job_group_id IN  per_job_groups.job_group_id%type)
114 RETURN VARCHAR2;
115 
116 
117 -- This function returns the job in the Project Resource Job
118 -- Group towhich p_job_id is mapped. Returns the job_id of
119 -- the job in PRJG
120 Function Get_Job_Mapping(p_job_id       IN NUMBER,
121                          p_job_group_id IN NUMBER)
122 RETURN NUMBER;
123 
124 /* Added for bug 6405426 */
125 PROCEDURE check_job_relationships (p_job_id IN number);
126 
127 END pa_job_utils;