DBA Data[Home] [Help]

PACKAGE: APPS.AK_QUERYOBJ_PVT

Source


1 package AK_QUERYOBJ_PVT as
2 /* $Header: akdvqrys.pls 120.2 2005/09/15 22:27:00 tshort ship $ */
3 G_PKG_NAME					VARCHAR2(30) := 'AK_QUERYOBJ_PVT';
4 G_QUERY_OBJECT_REDO_TBL		AK_QUERYOBJ_PUB.queryobj_tbl_type;
5 G_LINE_REDO_TBL				AK_QUERYOBJ_PUB.queryobj_lines_Tbl_Type;
6 G_QUERY_OBJECT_REDO_INDEX	NUMBER := 0;
7 G_LINE_REDO_INDEX			NUMBER := 0;
8 
9 --=======================================================
10 --  Procedure   DOWNLOAD_QUERY_OBJECT
11 --
12 --  Usage       Private API for downloading query objects. This
13 --              API should only be called by other APIs that are
14 --              owned by the Core Modules Team (AK).
15 --
16 --  Desc        This API will extract the query objects selected
17 --              by application ID or by key values from the
18 --              database to the output file.
19 --              If a query object is selected for writing to the loader
20 --              file, all its children records query_object_lines
21 --              that references this object will also be written.
22 --
23 --  Results     The API returns the standard p_return_status parameter
24 --              indicating one of the standard return statuses :
25 --                  * Unexpected error
26 --                  * Error
27 --                  * Success
28 --  Parameters
29 --              p_nls_language : IN optional
30 --                  NLS language for database. If none if given,
31 --                  the current NLS language will be used.
32 --
33 --              One of the following parameters must be provided:
34 --
35 --              p_application_id : IN optional
36 --                  If given, all attributes for this application ID
37 --                  will be written to the output file.
38 --                  p_application_id will be ignored if a table is
39 --                  given in p_object_pk_tbl.
40 --              p_queryobj_pk_tbl : IN optional
41 --                  If given, only queyr objects whose key values are
42 --                  included in this table will be written to the
43 --                  output file.
44 --
45 --
46 --  Version     Initial version number  =   1.0
47 --  History     Current version number  =   1.0
48 --=======================================================
49 procedure DOWNLOAD_QUERY_OBJECT (
50 p_validation_level         IN      NUMBER := FND_API.G_VALID_LEVEL_FULL,
51 p_api_version_number       IN      NUMBER,
52 p_return_status            OUT NOCOPY     VARCHAR2,
53 p_application_id           IN      NUMBER := FND_API.G_MISS_NUM,
54 p_queryobj_pk_tbl          IN      AK_QUERYOBJ_PUB.queryObj_PK_Tbl_Type
55 := AK_QUERYOBJ_PUB.G_MISS_QUERYOBJ_PK_TBL,
56 p_nls_language             IN      VARCHAR2
57 );
58 
59 --=======================================================
60 --  Procedure   CREATE_QUERY_OBJECT
61 --
62 --  Usage       Private API for creating query objects. This
63 --              API should only be called by other APIs that are
64 --              owned by the Core Modules Team (AK).
65 --=======================================================
66 
67 PROCEDURE CREATE_QUERY_OBJECT(
68 p_validation_level		IN      NUMBER := FND_API.G_VALID_LEVEL_FULL,
69 p_api_version_number	IN		NUMBER,
70 p_init_msg_tbl			IN      BOOLEAN := FALSE,
71 p_msg_count				OUT NOCOPY		NUMBER,
72 p_msg_data				OUT NOCOPY		VARCHAR2,
73 p_return_status			OUT NOCOPY		VARCHAR2,
74 p_query_code			IN		VARCHAR2,
75 p_application_id		IN		NUMBER,
76 p_created_by               IN     NUMBER := FND_API.G_MISS_NUM,
77 p_creation_date            IN      DATE := FND_API.G_MISS_DATE,
78 p_last_updated_by          IN     NUMBER := FND_API.G_MISS_NUM,
79 p_last_update_date         IN      DATE := FND_API.G_MISS_DATE,
80 p_last_update_login        IN     NUMBER := FND_API.G_MISS_NUM,
81 p_loader_timestamp      IN      DATE := FND_API.G_MISS_DATE,
82 p_pass					IN		NUMBER := 2
83 );
84 
85 --=======================================================
86 --  Procedure   CREATE_QUERY_OBJECT_LINE
87 --
88 --  Usage       Private API for creating query objects. This
89 --              API should only be called by other APIs that are
90 --              owned by the Core Modules Team (AK).
91 --=======================================================
92 
93 PROCEDURE CREATE_QUERY_OBJECT_LINE(
94 p_validation_level		IN      NUMBER := FND_API.G_VALID_LEVEL_FULL,
95 p_api_version_number	IN		NUMBER,
96 p_init_msg_tbl			IN      BOOLEAN := FALSE,
97 p_msg_count				OUT NOCOPY		NUMBER,
98 p_msg_data				OUT NOCOPY		VARCHAR2,
99 p_return_status			OUT NOCOPY		VARCHAR2,
100 p_query_code			IN		VARCHAR2,
101 p_seq_num				IN		NUMBER,
102 p_query_line_type 		IN		VARCHAR2,
103 p_query_line			IN		VARCHAR2 := FND_API.G_MISS_CHAR,
104 p_linked_parameter		IN		VARCHAR2 := FND_API.G_MISS_CHAR,
105 p_created_by               IN     NUMBER := FND_API.G_MISS_NUM,
106 p_creation_date            IN      DATE := FND_API.G_MISS_DATE,
107 p_last_updated_by          IN     NUMBER := FND_API.G_MISS_NUM,
108 p_last_update_date         IN      DATE := FND_API.G_MISS_DATE,
109 p_last_update_login        IN     NUMBER := FND_API.G_MISS_NUM,
110 p_loader_timestamp      IN      DATE := FND_API.G_MISS_DATE,
111 p_pass					IN		NUMBER := 2
112 );
113 
114 --=======================================================
115 --  Procedure   UPLOAD_QUERY_OBJECT
116 --
117 --  Usage       Private API for loading query objects from a
118 --              loader file to the database.
119 --              This API should only be called by other APIs
120 --              that are owned by the Core Modules Team (AK).
121 --
122 --  Desc        This API reads the query object data (including query
123 --              object lines) stored in the loader file currently being
124 --              processed, parses the data, and loads them to the
125 --              database. The tables are updated with the timestamp
126 --              passed. This API will process the file until the
127 --              EOF is reached, a parse error is encountered, or when
128 --              data for a different business object is read from the file.
129 --
130 --  Results     The API returns the standard p_return_status parameter
131 --              indicating one of the standard return statuses :
132 --                  * Unexpected error
133 --                  * Error
134 --                  * Success
135 --  Parameters  p_index : IN OUT required
136 --                  Index of PL/SQL file to be processed.
137 --              p_loader_timestamp : IN required
138 --                  The timestamp to be used when creating or updating
139 --                  records
140 --              p_line_num : IN optional
141 --                  The first line number in the file to be processed.
142 --                  It is used for keeping track of the line number
143 --                  read so that this info can be included in the
144 --                  error message when a parse error occurred.
145 --              p_buffer : IN required
146 --                  The content of the first line to be processed.
147 --                  The calling API has already read the first line
148 --                  that needs to be parsed by this API, so this
149 --                  line won't be read from the file again.
150 --              p_line_num_out : OUT
151 --                  The number of the last line in the loader file
152 --                  that is read by this API.
153 --              p_buffer_out : OUT
154 --                  The content of the last line read by this API.
155 --                  If an EOF has not reached, this line would
156 --                  contain the beginning of another business object
157 --                  that will need to be processed by another API.
158 --
159 --  Version     Initial version number  =   1.0
160 --  History     Current version number  =   1.0
161 --=======================================================
162 procedure UPLOAD_QUERY_OBJECT (
163 p_validation_level         IN      NUMBER := FND_API.G_VALID_LEVEL_FULL,
164 p_api_version_number       IN      NUMBER,
165 p_return_status            OUT NOCOPY     VARCHAR2,
166 p_index                    IN OUT NOCOPY  NUMBER,
167 p_loader_timestamp         IN      DATE,
168 p_line_num                 IN NUMBER := FND_API.G_MISS_NUM,
169 p_buffer                   IN AK_ON_OBJECTS_PUB.Buffer_Type,
170 p_line_num_out             OUT NOCOPY    NUMBER,
171 p_buffer_out               OUT NOCOPY    AK_ON_OBJECTS_PUB.Buffer_Type,
172 p_upl_loader_cur           IN OUT NOCOPY  AK_ON_OBJECTS_PUB.LoaderCurTyp,
173 p_pass                     IN      NUMBER := 1
174 );
175 
176 END AK_QUERYOBJ_PVT;