DBA Data[Home] [Help]

PACKAGE: APPS.FND_OAM_DSCRAM_STATS_PKG

Source


1 PACKAGE FND_OAM_DSCRAM_STATS_PKG AUTHID CURRENT_USER as
2 /* $Header: AFOAMDSSTATS.pls 120.1 2006/06/07 17:49:25 ilawler noship $ */
3 
4    ------------
5    -- Constants
6    ------------
7 
8    ---------------------------------
9    -- Public Procedures/Functions --
10    ---------------------------------
11 
12    -- API used by the Dscram java master controller to create a stats entry for each start/resume/restart
13    -- operation.
14    -- Invariants:
15    --   None
16    -- Parameters:
17    --   p_run_id          DSCRAM_RUNS.RUN_ID for which this stat is being created.
18    --   p_start_time      Run's start time
19    --   p_prestart_status Run's status prior to start, used to detect resumed runs
20    --   p_start_message   Anything to put in the message field as notes for the start
21    --   x_run_stat_id:    DSCRAM_STATS.STAT_ID of the stat row created
22    --   x_return_status:  FND_API-compliant return status
23    --   x_return_msg:     Message explaining non-success return statuses
24    PROCEDURE CREATE_ENTRY_FOR_RUN(p_run_id              IN NUMBER,
25                                   p_start_time          IN DATE,
26                                   p_prestart_status     IN VARCHAR2 DEFAULT NULL,
27                                   p_start_message       IN VARCHAR2 DEFAULT NULL,
28                                   x_run_stat_id         OUT NOCOPY      NUMBER,
29                                   x_return_status       OUT NOCOPY      VARCHAR2,
30                                   x_return_msg          OUT NOCOPY      VARCHAR2);
31 
32    -- API used by any Dscram code to allocate a stats row for an entity in the context of the passed
33    -- in p_run_stat_id.
34    -- Invariants:
35    --   A call to CREATE_ENTRY_FOR_RUN must have already occured to get a valid p_run_stat_id.
36    -- Parameters:
37    --   p_run_stat_id:        DSCRAM_STATS.STAT_ID for the run which the stat is to be associated with, must not be null
38    --   x_source_object_type: String corresponding to one of the CONSTANTS_PKG.G_TYPE_* constants
39    --   x_source_object_id:   Number corresponding to the unique ID of the object in its base table
40    --   x_start_time:         Datetime when object was started
41    --   x_prestart_status:    Status of the object prior to start
42    --   x_stat_id:            DSCRAM_STATS.STAT_ID of stat row created
43    --   x_return_status:      FND_API-compliant return status
44    --   x_return_msg:         Message explaining non-success return statuses
45    PROCEDURE CREATE_ENTRY(p_run_stat_id         IN NUMBER,
46                           p_source_object_type  IN VARCHAR2,
47                           p_source_object_id    IN NUMBER,
48                           p_start_time          IN DATE,
49                           p_prestart_status     IN VARCHAR2 DEFAULT NULL,
50                           p_start_message       IN VARCHAR2 DEFAULT NULL,
51                           x_stat_id             OUT NOCOPY      NUMBER);
52 
53    -- API used by PL/SQL Dscram code after an execute_bundle.  Figures out the run_stat_id from the bundle
54    -- state.
55    -- See: CREATE_ENTRY(p_run_stat_id...x_return_msg) above.
56    PROCEDURE CREATE_ENTRY(p_source_object_type  IN VARCHAR2,
57                           p_source_object_id    IN NUMBER,
58                           p_start_time          IN DATE,
59                           p_prestart_status     IN VARCHAR2 DEFAULT NULL,
60                           p_start_message       IN VARCHAR2 DEFAULT NULL,
61                           x_stat_id             OUT NOCOPY      NUMBER);
62 
63    -- Alternate API that wraps the create stats entry in an autonomous transaction and commits it.
64    -- If p_dismiss_failure is FND_API.G_TRUE, failed entries aren't logged.
65    -- See: CREATE_ENTRY(p_run_stat_id...x_return_msg) above.
66    PROCEDURE CREATE_ENTRY_AUTONOMOUSLY(p_source_object_type     IN VARCHAR2,
67                                        p_source_object_id       IN NUMBER,
68                                        p_start_time             IN DATE,
69                                        p_prestart_status        IN VARCHAR2 DEFAULT NULL,
70                                        p_start_message          IN VARCHAR2 DEFAULT NULL,
71                                        p_dismiss_failure        IN VARCHAR2 DEFAULT NULL,
72                                        x_stat_id                OUT NOCOPY NUMBER);
73 
74    -- API used by the Dscram java master controller to create a stats entry for each start/resume/restart
75    -- operation.
76    -- Invariants:
77    --   None
78    -- Parameters:
79    --   p_run_id          DSCRAM_RUNS.RUN_ID for which this stat is being created.
80    --   p_end_time        Time when entity completed
81    --   p_postend_status  Status of object after completion
82    --   p_end_message     Any message you want to attach as notes to completion, may be an error code
83    --   x_run_stat_id:    DSCRAM_STATS.STAT_ID of the stat row created
84    --   x_return_status:  FND_API-compliant return status
85    --   x_return_msg:     Message explaining non-success return statuses
86    PROCEDURE COMPLETE_ENTRY_FOR_RUN(p_run_id            IN NUMBER,
87                                     p_end_time          IN DATE,
88                                     p_postend_status    IN VARCHAR2 DEFAULT NULL,
89                                     p_end_message       IN VARCHAR2 DEFAULT NULL,
90                                     x_return_status     OUT NOCOPY      VARCHAR2,
91                                     x_return_msg        OUT NOCOPY      VARCHAR2);
92 
93    -- API used by any Dscram code to finish off a stats row
94    -- in p_run_stat_id.
95    -- Invariants:
96    --   A call to CREATE_ENTRY_FOR_RUN must have already occured to get a valid p_run_stat_id.
97    -- Parameters:
98    --   p_run_stat_id:        DSCRAM_STATS.STAT_ID for the run which the stat is to be associated with, must not be null
99    --   x_source_object_type: String corresponding to one of the CONSTANTS_PKG.G_TYPE_* constants
100    --   x_source_object_id:   Number corresponding to the unique ID of the object in its base table
101    --   p_end_time        Time when entity completed
102    --   p_postend_status  Status of object after completion
103    --   p_end_message     Any message you want to attach as notes to completion, may be an error code
104    --
105    -- Doesn't include return statuses because a failed stats completion wouldn't fail the completed object.
106    PROCEDURE COMPLETE_ENTRY(p_run_stat_id               IN NUMBER,
107                             p_source_object_type        IN VARCHAR2,
108                             p_source_object_id          IN NUMBER,
109                             p_end_time                  IN DATE,
110                             p_postend_status            IN VARCHAR2 DEFAULT NULL,
111                             p_end_message               IN VARCHAR2 DEFAULT NULL);
112 
113    -- API used by PL/SQL Dscram code in the complete_<object> procedures.
114    -- Figures out the run_stat_id from the bundle state.
115    -- See: COMPLETE_ENTRY above.
116    PROCEDURE COMPLETE_ENTRY(p_source_object_type        IN VARCHAR2,
117                             p_source_object_id          IN NUMBER,
118                             p_end_time                  IN DATE,
119                             p_postend_status            IN VARCHAR2 DEFAULT NULL,
120                             p_end_message               IN VARCHAR2 DEFAULT NULL);
121 
122 
123    -- API used to test for the existence of a stats row.
124    -- Invariants:
125    --   None.
126    -- Parameters:
127    --   p_run_stat_id:        DSCRAM_STATS.STAT_ID for the run which the stat is to be associated with, must not be null
128    --   x_source_object_type: String corresponding to one of the CONSTANTS_PKG.G_TYPE_* constants
129    --   x_source_object_id:   Number corresponding to the unique ID of the object in its base table
130    FUNCTION HAS_ENTRY(p_run_stat_id             IN NUMBER,
131                       p_source_object_type      IN VARCHAR2,
132                       p_source_object_id        IN NUMBER)
133       RETURN BOOLEAN;
134 
135    -- API used to test for the existence of a stats row.
136    -- Invariants:
137    --   None.
138    -- Parameters:
139    --   x_source_object_type: String corresponding to one of the CONSTANTS_PKG.G_TYPE_* constants
140    --   x_source_object_id:   Number corresponding to the unique ID of the object in its base table
141    FUNCTION HAS_ENTRY(p_source_object_type      IN VARCHAR2,
142                       p_source_object_id        IN NUMBER)
143       RETURN BOOLEAN;
144 
145 END FND_OAM_DSCRAM_STATS_PKG;