1 PACKAGE csi_ii_relationships_pub AUTHID CURRENT_USER AS
2 /* $Header: csipiirs.pls 120.0 2005/05/25 02:41:01 appldev noship $ */
3 /*#
4 * This is a public API for managing Instance-to-Instance Relationships.
5 * It contains routines to Create, Update and Get Instance-to-Instance Relationships.
6 * @rep:scope public
7 * @rep:product CSI
8 * @rep:displayname Manage Instance-to-Instance Relationships
9 * @rep:lifecycle active
10 * @rep:compatibility S
11 * @rep:category BUSINESS_ENTITY CSI_ITEM_INSTANCE
12 */
13 -- start of comments
14 -- package name : csi_ii_relationships_pub
15 -- purpose :
16 -- history :
17 -- note :
18 -- end of comments
19
20 -- default NUMBER of records fetch per call
21 g_default_num_rec_fetch NUMBER := 30;
22
23 /*#
24 * This procedure gets the list of relationship(s) among item instances.
25 * If the parameter p_time_stamp is passed the relationship information would be constructed
26 * from the history. Otherwise the current relationship would be retreived.
27 * @param p_api_version API version
28 * @param p_commit API commits if set to fnd_api.g_true
29 * @param p_init_msg_list Initializes the message stack if set to fnd_api.g_true
30 * @param p_validation_level API validation level
31 * @param p_relationship_query_rec Record structure containing the query criteria
32 * @param p_depth Determines the level to be exploded. If null explode all the levels
33 * @param p_time_stamp Get the configuration at this given time
34 * @param p_active_relationship_only Determines whether to get active relationships only or not
35 * @param x_relationship_tbl Contains the output Relationship table structure for the given query
36 * @param x_return_status API Return Status
37 * @param x_msg_count Message count
38 * @param x_msg_data Message Data
39 * @rep:scope public
40 * @rep:lifecycle active
41 * @rep:displayname Get Relationships
42 */
43 PROCEDURE get_relationships
44 (
45 p_api_version IN NUMBER,
46 p_commit IN VARCHAR2 := fnd_api.g_false,
47 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
48 p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
49 p_relationship_query_rec IN csi_datastructures_pub.relationship_query_rec,
50 p_depth IN NUMBER,
51 p_time_stamp IN DATE,
52 p_active_relationship_only IN VARCHAR2 := fnd_api.g_false,
53 x_relationship_tbl OUT NOCOPY csi_datastructures_pub.ii_relationship_tbl,
54 x_return_status OUT NOCOPY VARCHAR2,
55 x_msg_count OUT NOCOPY NUMBER,
56 x_msg_data OUT NOCOPY VARCHAR2
57 );
58
59
60 /*#
61 * This procedure creates Instance-to-Instance Relationship(s)
62 * @param p_api_version API version
63 * @param p_commit API commits if set to fnd_api.g_true
64 * @param p_init_msg_list Initializes the message stack if set to fnd_api.g_true
65 * @param p_validation_level API validation level
66 * @param p_relationship_tbl Table of records for instance-to-instance relationships to be created
67 * @param p_txn_rec Transaction Record structure
68 * @param x_return_status API Return Status
69 * @param x_msg_count Message count
70 * @param x_msg_data Message Data
71 * @rep:scope public
72 * @rep:lifecycle active
73 * @rep:displayname Create Relationships
74 */
75 PROCEDURE create_relationship(
76 p_api_version IN NUMBER,
77 p_commit IN VARCHAR2 := fnd_api.g_false,
78 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
79 p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
80 p_relationship_tbl IN OUT NOCOPY csi_datastructures_pub.ii_relationship_tbl,
81 p_txn_rec IN OUT NOCOPY csi_datastructures_pub.transaction_rec,
82 x_return_status OUT NOCOPY VARCHAR2,
83 x_msg_count OUT NOCOPY NUMBER,
84 x_msg_data OUT NOCOPY VARCHAR2
85 );
86
87 /*#
88 * This procedure updates Instance-to-Instance Relationship(s)
89 * @param p_api_version API version
90 * @param p_commit API commits if set to fnd_api.g_true
91 * @param p_init_msg_list Initializes the message stack if set to fnd_api.g_true
92 * @param p_validation_level API validation level
93 * @param p_relationship_tbl Table of records for instance-to-instance relationships to be updated
94 * @param p_txn_rec Transaction Record structure
95 * @param x_return_status API Return Status
96 * @param x_msg_count Message count
97 * @param x_msg_data Message Data
98 * @rep:scope public
99 * @rep:lifecycle active
100 * @rep:displayname Update Relationships
101 */
102 PROCEDURE update_relationship
103 (
104 p_api_version IN NUMBER,
105 p_commit IN VARCHAR2 := fnd_api.g_false,
106 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
107 p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
108 p_relationship_tbl IN csi_datastructures_pub.ii_relationship_tbl,
109 p_txn_rec IN OUT NOCOPY csi_datastructures_pub.transaction_rec,
110 x_return_status OUT NOCOPY VARCHAR2,
111 x_msg_count OUT NOCOPY NUMBER,
112 x_msg_data OUT NOCOPY VARCHAR2
113 );
114
115 PROCEDURE expire_relationship
116 (
117 p_api_version IN NUMBER,
118 p_commit IN VARCHAR2 := fnd_api.g_false,
119 p_init_msg_list IN VARCHAR2 := fnd_api.g_false,
120 p_validation_level IN NUMBER := fnd_api.g_valid_level_full,
121 p_relationship_rec IN csi_datastructures_pub.ii_relationship_rec,
122 p_txn_rec IN OUT NOCOPY csi_datastructures_pub.transaction_rec,
123 x_instance_id_lst OUT NOCOPY csi_datastructures_pub.id_tbl,
124 x_return_status OUT NOCOPY VARCHAR2,
125 x_msg_count OUT NOCOPY NUMBER,
126 x_msg_data OUT NOCOPY VARCHAR2
127 );
128
129 end csi_ii_relationships_pub;