1 PACKAGE EAM_PERMIT_UTILITY_PVT AUTHID CURRENT_USER AS
2 /* $Header: EAMVWPUS.pls 120.1 2011/03/04 21:20:55 mashah noship $ */
3
4 /*********************************************************************
5 * Procedure : QUERY_ROW
6 * Purpose : Procedure will query the database record
7 and return with those records.
8 ***********************************************************************/
9 PROCEDURE QUERY_ROW
10 ( p_work_permit_id IN NUMBER
11 , p_organization_id IN NUMBER
12 , x_work_permit_header_rec OUT NOCOPY EAM_PROCESS_SAFETY_PUB.eam_wp_header_rec_type
13 , x_Return_status OUT NOCOPY VARCHAR2
14 );
15
16
17 /********************************************************************
18 * Procedure : INSERT_ROW
19 * Purpose : Procedure will perfrom an insert into the table
20 *********************************************************************/
21 PROCEDURE INSERT_ROW
22 (p_work_permit_header_rec IN EAM_PROCESS_SAFETY_PUB.eam_wp_header_rec_type
23 , x_return_Status OUT NOCOPY VARCHAR2
24 );
25
26 /********************************************************************
27 * Procedure : UPDATE_ROW
28 * Purpose : Procedure will perform an update on the table
29 *********************************************************************/
30 PROCEDURE UPDATE_ROW
31 ( p_work_permit_header_rec IN EAM_PROCESS_SAFETY_PUB.eam_wp_header_rec_type
32 , x_mesg_token_Tbl OUT NOCOPY EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type
33 , x_return_Status OUT NOCOPY VARCHAR2
34 );
35
36
37 /********************************************************************
38 * Procedure : PERFORM_WRITES
39 * Purpose : This is the only procedure that the user will have
40 access to when he/she needs to perform any kind of writes to the table.
41 *********************************************************************/
42
43 PROCEDURE PERFORM_WRITES
44 ( p_work_permit_header_rec IN EAM_PROCESS_SAFETY_PUB.eam_wp_header_rec_type
45 , x_mesg_token_Tbl OUT NOCOPY EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type
46 , x_return_Status OUT NOCOPY VARCHAR2
47 );
48
49
50
51 /********************************************************************
52 * Procedure : CHANGE_WORK_PERMIT_STATUS
53 * Purpose : This procedure will be used to change status of a permit.
54 *********************************************************************/
55 PROCEDURE CHANGE_WORK_PERMIT_STATUS
56 ( p_permit_id IN NUMBER
57 , p_organization_id IN NUMBER
58 , p_to_status_type IN NUMBER
59 , p_user_id IN NUMBER := null
60 , p_responsibility_id IN NUMBER := null
61 , p_transaction_type IN NUMBER
62 , x_return_status OUT NOCOPY VARCHAR2
63 , x_Mesg_Token_Tbl OUT NOCOPY EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type
64 );
65
66
67 /********************************************************************
68 * Procedure : INSERT_PERMIT_HISTORY_ROW
69 * Purpose : This procedure will be used to write permit history to EAM_SAFETY_HISTORY table
70 *********************************************************************/
71 PROCEDURE INSERT_PERMIT_HISTORY_ROW
72 ( p_object_id IN NUMBER
73 , p_object_name IN VARCHAR2
74 , p_object_type IN NUMBER :=3
75 , p_event IN VARCHAR2
76 , p_status IN VARCHAR2
77 , p_details IN VARCHAR2
78 , p_user_id IN NUMBER
79 , x_mesg_token_Tbl OUT NOCOPY EAM_ERROR_MESSAGE_PVT.Mesg_Token_Tbl_Type
80 , x_return_Status OUT NOCOPY VARCHAR2
81 );
82
83
84 END EAM_PERMIT_UTILITY_PVT;
85