1 package AK_OBJECT2_PVT AUTHID CURRENT_USER as
2 /* $Header: akdvob2s.pls 115.2 99/07/17 15:20:49 porting s $ */
3
4 -- Global constants holding the package and file names to be used by
5 -- messaging routines in the case of an unexpected error.
6
7 G_PKG_NAME CONSTANT VARCHAR2(30) := 'AK_OBJECT2_PVT';
8
9 -- PL/SQL table for holding records that need to be processed
10 -- the second time in UPLOAD
11 G_OBJECT_REDO_TBL AK_OBJECT_PUB.Object_Tbl_Type;
12 G_OBJECT_ATTR_REDO_TBL AK_OBJECT_PUB.Object_Attribute_Tbl_Type;
13 G_ATTR_NAV_REDO_TBL AK_OBJECT_PUB.Attribute_Nav_Tbl_Type;
14 G_UNIQUE_KEY_REDO_TBL AK_KEY_PUB.Unique_Key_Tbl_Type;
15 G_UNIQUE_KEY_COL_REDO_TBL AK_KEY_PUB.Unique_Key_Column_Tbl_Type;
16 G_FOREIGN_KEY_REDO_TBL AK_KEY_PUB.Foreign_Key_Tbl_Type;
17 G_FOREIGN_KEY_COL_REDO_TBL AK_KEY_PUB.Foreign_Key_Column_Tbl_Type;
18
19 --
20 -- Pointer to redo tables
21 G_OBJECT_REDO_INDEX NUMBER := 0;
22 G_OBJECT_ATTR_REDO_INDEX NUMBER := 0;
23 G_ATTR_NAV_REDO_INDEX NUMBER := 0;
24 G_UNIQUE_KEY_REDO_INDEX NUMBER := 0;
25 G_UNIQUE_KEY_COL_REDO_INDEX NUMBER := 0;
26 G_FOREIGN_KEY_REDO_INDEX NUMBER := 0;
27 G_FOREIGN_KEY_COL_REDO_INDEX NUMBER := 0;
28
29 --=======================================================
30 -- Procedure DOWNLOAD_OBJECT
31 --
32 -- Usage Private API for downloading objects. This
33 -- API should only be called by other APIs that are
34 -- owned by the Core Modules Team (AK).
35 --
36 -- Desc This API will extract the objects selected
37 -- by application ID or by key values from the
38 -- database to the output file.
39 -- If an object is selected for writing to the loader
40 -- file, all its children records (including object
41 -- attributes, foreign and unique key definitions,
42 -- attribute values, attribute navigation, and regions
43 -- that references this object, depending on the
44 -- value of p_get_region_flag) will also be written.
45 --
46 -- Results The API returns the standard p_return_status parameter
47 -- indicating one of the standard return statuses :
48 -- * Unexpected error
49 -- * Error
50 -- * Success
51 -- Parameters
52 -- p_attribute_pk_tbl : IN optional
53 -- If given, attributes whose key values are
54 -- included in this table will be extracted and
55 -- written to the output file. This is used for
56 -- extracting additional attributes, for instance,
57 -- attributes that are referenced by the region items
58 -- whose regions are referencing this object when
59 -- this API is called by the DOWNLOAD_REGION API.
60 -- p_get_region_flag : IN required
61 -- Call DOWNLOAD_REGION API to extract regions that
62 -- are referencing the objects that will be extracted
63 -- by this API if this parameter is 'Y'.
64 -- p_nls_language : IN optional
65 -- NLS language for database. If none if given,
66 -- the current NLS language will be used.
67 --
68 -- One of the following parameters must be provided:
69 --
70 -- p_application_id : IN optional
71 -- If given, all attributes for this application ID
72 -- will be written to the output file.
73 -- p_application_id will be ignored if a table is
74 -- given in p_object_pk_tbl.
75 -- p_object_pk_tbl : IN optional
76 -- If given, only objects whose key values are
77 -- included in this table will be written to the
78 -- output file.
79 --
80 --
81 -- Version Initial version number = 1.0
82 -- History Current version number = 1.0
83 --=======================================================
84 procedure DOWNLOAD_OBJECT (
85 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
86 p_api_version_number IN NUMBER,
87 p_return_status OUT VARCHAR2,
88 p_application_id IN NUMBER := FND_API.G_MISS_NUM,
89 p_object_pk_tbl IN AK_OBJECT_PUB.Object_PK_Tbl_Type
90 := AK_OBJECT_PUB.G_MISS_OBJECT_PK_TBL,
91 p_attribute_pk_tbl IN AK_ATTRIBUTE_PUB.Attribute_PK_Tbl_Type
92 := AK_ATTRIBUTE_PUB.G_MISS_ATTRIBUTE_PK_TBL,
93 p_nls_language IN VARCHAR2,
94 p_get_region_flag IN VARCHAR2
95 );
96
97 --=======================================================
98 -- Procedure UPLOAD_OBJECT_SECOND
99 --
100 -- Usage Private API for loading objects that were
101 -- failed during its first pass
102 -- This API should only be called by other APIs
103 -- that are owned by the Core Modules Team (AK).
104 --
105 -- Desc This API reads the object data from PL/SQL table
106 -- that was prepared during 1st pass, then processes
107 -- the data, and loads them to the database. The tables
108 -- are updated with the timestamp passed. This API
109 -- will process the file until the EOF is reached,
110 -- a parse error is encountered, or when data for
111 -- a different business object is read from the file.
112 --
113 -- Results The API returns the standard p_return_status parameter
114 -- indicating one of the standard return statuses :
115 -- * Unexpected error
116 -- * Error
117 -- * Success
118 -- Parameters p_validation_level : IN required
119 -- validation level
120 --
121 -- Version Initial version number = 1.0
122 -- History Current version number = 1.0
123 --=======================================================
124 procedure UPLOAD_OBJECT_SECOND (
125 p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
126 p_return_status OUT VARCHAR2,
127 p_loader_timestamp IN DATE := FND_API.G_MISS_DATE,
128 p_pass IN NUMBER := 2
129 );
130
131 end AK_OBJECT2_PVT;