1 PACKAGE fnd_flex_trigger AS
2 /* $Header: AFFFSV3S.pls 120.1.12010000.1 2008/07/25 14:14:31 appldev ship $ */
3
4
5 --------
6 -- PRIVATE TYPES
7 --
8 --
9
10 ------------
11 -- PRIVATE CONSTANTS
12 --
13
14 -------------
15 -- EXCEPTIONS
16 --
17
18
19 -------------
20 -- GLOBAL VARIABLES
21 --
22
23 /* ----------------------------------------------------------------------- */
24 /* The following functions are called only from triggers on */
25 /* FND_FLEX_VALIDATION_RULES and FND_FLEX_VALIDATION_RULE_LINES. */
26 /* The trigger should use FND_MESSAGE.raise_exception if any of */
27 /* these functions returns error. */
28 /* ----------------------------------------------------------------------- */
29
30 /* ----------------------------------------------------------------------- */
31 /* Updates the FND_FLEX_VALIDATION_RULE_STATS table with the number */
32 /* of new rules, new include rule lines and new exclude rule lines */
33 /* for the given flexfield structure. Creates a new row in the */
34 /* rule stats table if there isn't already one there for this */
35 /* structure. Can input negative numbers to mean rules or lines */
36 /* were deleted. If anything deleted limits counts in rule stats */
37 /* table to >= 0. Does not delete rows from the rule stats table. */
38 /* Also sets the last update date to sysdate whenever it is called */
39 /* even if there were no new rules or lines. This is so that the */
40 /* last update for each flex structure can be set when a rule or line */
41 /* is updated. This is useful for keeping track of when to outdate */
42 /* entries in the cross-validation rules cache. */
43 /* Returns TRUE on success or FALSE and sets FND_MESSAGE if error. */
44 /* ----------------------------------------------------------------------- */
45 FUNCTION update_cvr_stats(appid IN NUMBER,
46 flex_code IN VARCHAR2,
47 flex_num IN NUMBER,
48 n_new_rules IN NUMBER,
49 n_new_incls IN NUMBER,
50 n_new_excls IN NUMBER) RETURN BOOLEAN;
51
52 /* ----------------------------------------------------------------------- */
53 /* Inserts separated segments of new rule line into */
54 /* the include or exclude lines table. Then updates the line count */
55 /* in the statistics table. */
56 /* Returns TRUE on success or FALSE and sets FND_MESSAGE if error. */
57 /* ----------------------------------------------------------------------- */
58 FUNCTION insert_rule_line(ruleline_id IN NUMBER,
59 appid IN NUMBER,
60 flex_code IN VARCHAR2,
61 flex_num IN NUMBER,
62 rule_name IN VARCHAR2,
63 incl_excl IN VARCHAR2,
64 enab_flag IN VARCHAR2,
65 create_by IN NUMBER,
66 create_date IN DATE,
67 update_date IN DATE,
68 update_by IN NUMBER,
69 update_login IN NUMBER,
70 catsegs_low IN VARCHAR2,
71 catsegs_high IN VARCHAR2) RETURN BOOLEAN;
72
73 /* ----------------------------------------------------------------------- */
74 /* Updates rule line specified by ruleline_id in either */
75 /* the include or exclude lines table. Then updates the line count */
76 /* in the statistics table. */
77 /* Returns TRUE on success or FALSE and sets FND_MESSAGE if error. */
78 /* ----------------------------------------------------------------------- */
79 FUNCTION update_rule_line(ruleline_id IN NUMBER,
80 appid IN NUMBER,
81 flex_code IN VARCHAR2,
82 flex_num IN NUMBER,
83 rule_name IN VARCHAR2,
84 incl_excl IN VARCHAR2,
85 enab_flag IN VARCHAR2,
86 create_by IN NUMBER,
87 create_date IN DATE,
88 update_date IN DATE,
89 update_by IN NUMBER,
90 update_login IN NUMBER,
91 catsegs_low IN VARCHAR2,
92 catsegs_high IN VARCHAR2) RETURN BOOLEAN;
93
94 /* ----------------------------------------------------------------------- */
95 /* Deletes rule line by rule_line_id from either */
96 /* the include or exclude lines table. Then updates the line count */
97 /* in the statistics table. */
98 /* Returns TRUE on success or FALSE and sets FND_MESSAGE if error. */
99 /* ----------------------------------------------------------------------- */
100 FUNCTION delete_rule_line(ruleline_id IN NUMBER,
101 appid IN NUMBER,
102 flex_code IN VARCHAR2,
103 flex_num IN NUMBER,
104 incl_excl IN VARCHAR2) RETURN BOOLEAN;
105
106 /* ----------------------------------------------------------------------- */
107
108 END fnd_flex_trigger;