DBA Data[Home] [Help]

APPS.IEM_CLASSIFICATIONS_PVT dependencies on IEM_CLASSIFICATIONS

Line 1: PACKAGE BODY IEM_CLASSIFICATIONS_PVT as

1: PACKAGE BODY IEM_CLASSIFICATIONS_PVT as
2: /* $Header: iemvclab.pls 115.16 2003/08/26 23:42:12 sboorela shipped $*/
3:
4: /* Fixed Bug 1339176 rtripath on 11/27/00 Do the cascading delete */
5: /* 08/14/01 chtang added create_item_wrap_sss() for 11.5.6 */

Line 9: G_PKG_NAME CONSTANT varchar2(30) :='IEM_CLASSIFICATIONS_PVT';

5: /* 08/14/01 chtang added create_item_wrap_sss() for 11.5.6 */
6: /* 06/05/02 chtang fixed 2403484
7: /* 11/20/02 chtang removed SQL%NOTFOUND in delete_item_wrap_sss
8: /*****************************************************************/
9: G_PKG_NAME CONSTANT varchar2(30) :='IEM_CLASSIFICATIONS_PVT';
10:
11: -- Start of Comments
12: -- API name : create_item
13: -- Type : Private

Line 14: -- Function : This procedure create a record in the table IEM_CLASSIFICATIONS

10:
11: -- Start of Comments
12: -- API name : create_item
13: -- Type : Private
14: -- Function : This procedure create a record in the table IEM_CLASSIFICATIONS
15: -- Pre-reqs : None.
16: -- Parameters :
17: -- IN
18: -- p_api_version_number IN NUMBER Required

Line 102: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND

98: -- Initialize API return status to SUCCESS
99: x_return_status := FND_API.G_RET_STS_SUCCESS;
100:
101: -- Take this out. Handle duplicates in exception handling.
102: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND
103: CLASSIFICATION=p_classification AND rownum=1;
104:
105: IF l_cnt=0 THEN
106: select iem_classifications_s1.nextval into l_seq from dual;

Line 106: select iem_classifications_s1.nextval into l_seq from dual;

102: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND
103: CLASSIFICATION=p_classification AND rownum=1;
104:
105: IF l_cnt=0 THEN
106: select iem_classifications_s1.nextval into l_seq from dual;
107: INSERT INTO IEM_CLASSIFICATIONS
108: (
109: CLASSIFICATION_ID,
110: EMAIL_ACCOUNT_ID ,

Line 107: INSERT INTO IEM_CLASSIFICATIONS

103: CLASSIFICATION=p_classification AND rownum=1;
104:
105: IF l_cnt=0 THEN
106: select iem_classifications_s1.nextval into l_seq from dual;
107: INSERT INTO IEM_CLASSIFICATIONS
108: (
109: CLASSIFICATION_ID,
110: EMAIL_ACCOUNT_ID ,
111: CLASSIFICATION ,

Line 207: -- Function : This procedure delete a record in the table IEM_CLASSIFICATIONS

203:
204: -- Start of Comments
205: -- API name : delete_item
206: -- Type : Private
207: -- Function : This procedure delete a record in the table IEM_CLASSIFICATIONS
208: -- Pre-reqs : None.
209: -- Parameters :
210: -- IN
211: -- p_api_version_number IN NUMBER Required

Line 262: DELETE FROM IEM_CLASSIFICATIONS

258: x_return_status := FND_API.G_RET_STS_SUCCESS;
259: IF p_classification_id IS NOT NULL THEN
260: DELETE FROM IEM_THEMES
261: WHERE CLASSIFICATION_ID=p_classification_id;
262: DELETE FROM IEM_CLASSIFICATIONS
263: WHERE CLASSIFICATION_ID=p_classification_id;
264: ELSE
265: DELETE FROM IEM_CLASSIFICATIONS
266: WHERE EMAIL_ACCOUNT_ID=P_EMAIL_ACCOUNT_ID

Line 265: DELETE FROM IEM_CLASSIFICATIONS

261: WHERE CLASSIFICATION_ID=p_classification_id;
262: DELETE FROM IEM_CLASSIFICATIONS
263: WHERE CLASSIFICATION_ID=p_classification_id;
264: ELSE
265: DELETE FROM IEM_CLASSIFICATIONS
266: WHERE EMAIL_ACCOUNT_ID=P_EMAIL_ACCOUNT_ID
267: AND CLASSIFICATION=P_CLASSIFICATION;
268: END IF;
269:

Line 315: -- Function : This procedure update a record in the table IEM_CLASSIFICATIONS

311:
312: -- Start of Comments
313: -- API name : update_item
314: -- Type : Private
315: -- Function : This procedure update a record in the table IEM_CLASSIFICATIONS
316: -- Pre-reqs : None.
317: -- Parameters :
318: -- IN
319: -- p_api_version_number IN NUMBER Required

Line 392: UPDATE IEM_CLASSIFICATIONS

388: FND_MSG_PUB.initialize;
389: END IF;
390: -- Initialize API return status to SUCCESS
391: x_return_status := FND_API.G_RET_STS_SUCCESS;
392: UPDATE IEM_CLASSIFICATIONS
393: SET CLASSIFICATION=decode(p_classification,FND_API.G_MISS_CHAR,null,null,CLASSIFICATION,p_CLASSIFICATION),
394: LAST_UPDATE_DATE = l_LAST_UPDATE_DATE,
395: LAST_UPDATED_BY = decode(l_LAST_UPDATED_BY,null,-1,l_LAST_UPDATED_BY),
396: LAST_UPDATE_LOGIN =decode(l_LAST_UPDATE_LOGIN,null,-1,l_LAST_UPDATE_LOGIN),

Line 507: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND

503:
504: x_return_status := FND_API.G_RET_STS_SUCCESS;
505:
506: -- Take this out when create_item procedure handles duplicates in the exception block.
507: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND
508: CLASSIFICATION=p_classification AND rownum=1;
509:
510: IF (l_cnt > 0 ) then
511: raise IEM_DUP_CLASS;

Line 527: IEM_CLASSIFICATIONS_PVT.create_item(

523:
524: l_classification2 := rtrim(ltrim(l_classification, ' '), ' ');
525:
526:
527: IEM_CLASSIFICATIONS_PVT.create_item(
528: p_api_version_number =>p_api_version_number,
529: p_init_msg_list => p_init_msg_list,
530: p_commit => p_commit,
531: p_email_account_id =>p_email_account_id,

Line 646: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND

642:
643: x_return_status := FND_API.G_RET_STS_SUCCESS;
644:
645: -- Take this out when create_item procedure handles duplicates in the exception block.
646: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND
647: CLASSIFICATION=p_classification AND rownum=1;
648:
649: IF (l_cnt > 0 ) then
650: raise IEM_DUP_CLASS;

Line 666: IEM_CLASSIFICATIONS_PVT.create_item(

662:
663: l_classification2 := rtrim(ltrim(l_classification, ' '), ' ');
664:
665:
666: IEM_CLASSIFICATIONS_PVT.create_item(
667: p_api_version_number =>p_api_version_number,
668: p_init_msg_list => p_init_msg_list,
669: p_commit => p_commit,
670: p_email_account_id =>p_email_account_id,

Line 784: FROM IEM_CLASSIFICATIONS

780: DELETE
781: FROM IEM_THEMES
782: WHERE classification_id = p_clas_ids_tbl(i);
783: DELETE
784: FROM IEM_CLASSIFICATIONS
785: WHERE classification_id = p_clas_ids_tbl(i);
786: END LOOP;
787:
788: IF SQL%NOTFOUND THEN

Line 880: from iem_classifications

876: l_class_id:=p_clas_ids_tbl(j);
877: EXIT;
878: END LOOP;
879: select email_account_id into l_email_account_id
880: from iem_classifications
881: where classification_id=l_class_id;
882: FOR i IN p_clas_ids_tbl.FIRST..p_clas_ids_tbl.LAST
883: LOOP
884: DELETE

Line 888: FROM IEM_CLASSIFICATIONS

884: DELETE
885: FROM IEM_THEMES
886: WHERE classification_id = p_clas_ids_tbl(i);
887: DELETE
888: FROM IEM_CLASSIFICATIONS
889: WHERE classification_id = p_clas_ids_tbl(i);
890: END LOOP;
891: delete from iem_account_intent_docs
892: where classification_id not in

Line 893: (select classification_id from iem_classifications);

889: WHERE classification_id = p_clas_ids_tbl(i);
890: END LOOP;
891: delete from iem_account_intent_docs
892: where classification_id not in
893: (select classification_id from iem_classifications);
894: delete from iem_theme_docs
895: where account_intent_doc_id not in
896: (select account_intent_doc_id from iem_account_intent_docs);
897: iem_themes_pvt.calculate_weight (l_email_account_id,

Line 995: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND

991:
992: l_classification2 := rtrim(ltrim(l_classification, ' '), ' ');
993:
994: -- Take this out when create_item procedure handles duplicates in the exception block.
995: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND
996: CLASSIFICATION=l_classification2 AND rownum=1;
997:
998: IF (l_cnt > 0 ) then
999: FND_MESSAGE.SET_NAME('IEM','IEM_DUPLICATE_CLASSIFICATION');

Line 1004: IEM_CLASSIFICATIONS_PVT.update_item(

1000: APP_EXCEPTION.RAISE_EXCEPTION;
1001: end if;
1002:
1003:
1004: IEM_CLASSIFICATIONS_PVT.update_item(
1005: p_api_version_number =>p_api_version_number,
1006: p_init_msg_list => p_init_msg_list,
1007: p_commit => p_commit,
1008: p_classification_id =>p_classification_id,

Line 1122: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND

1118:
1119: l_classification2 := rtrim(ltrim(l_classification, ' '), ' ');
1120:
1121: -- Take this out when create_item procedure handles duplicates in the exception block.
1122: SELECT count(*) into l_cnt from iem_classifications WHERE EMAIL_ACCOUNT_ID=p_email_account_id AND
1123: upper(CLASSIFICATION)=upper(l_classification2) AND rownum=1;
1124:
1125: IF (l_cnt > 0 ) then
1126: raise DUPLICATE_INTENT;

Line 1129: from iem_classifications

1125: IF (l_cnt > 0 ) then
1126: raise DUPLICATE_INTENT;
1127: end if;
1128: select email_account_id into l_email_account_id
1129: from iem_classifications
1130: where classification_id=p_classification_id;
1131:
1132: IEM_CLASSIFICATIONS_PVT.update_item(
1133: p_api_version_number =>p_api_version_number,

Line 1132: IEM_CLASSIFICATIONS_PVT.update_item(

1128: select email_account_id into l_email_account_id
1129: from iem_classifications
1130: where classification_id=p_classification_id;
1131:
1132: IEM_CLASSIFICATIONS_PVT.update_item(
1133: p_api_version_number =>p_api_version_number,
1134: p_init_msg_list => p_init_msg_list,
1135: p_commit => p_commit,
1136: p_classification_id =>p_classification_id,

Line 1258: from iem_classifications

1254: BEGIN
1255: x_return_status:='S';
1256: BEGIN
1257: SELECT classification_id into l_class_id
1258: from iem_classifications
1259: WHERE EMAIL_ACCOUNT_ID=p_email_account_id
1260: AND upper(CLASSIFICATION)=upper(p_classification) ;
1261: IEM_INTENT_DOCS_PVT.create_item(
1262: p_classification_id=>l_class_id,

Line 1271: select iem_classifications_s1.nextval into l_seq from dual;

1267: IF l_status='E' THEN
1268: raise DOC_EXCEP;
1269: END IF;
1270: EXCEPTION WHEN NO_DATA_FOUND THEN
1271: select iem_classifications_s1.nextval into l_seq from dual;
1272: INSERT INTO IEM_CLASSIFICATIONS
1273: (
1274: CLASSIFICATION_ID,
1275: EMAIL_ACCOUNT_ID ,

Line 1272: INSERT INTO IEM_CLASSIFICATIONS

1268: raise DOC_EXCEP;
1269: END IF;
1270: EXCEPTION WHEN NO_DATA_FOUND THEN
1271: select iem_classifications_s1.nextval into l_seq from dual;
1272: INSERT INTO IEM_CLASSIFICATIONS
1273: (
1274: CLASSIFICATION_ID,
1275: EMAIL_ACCOUNT_ID ,
1276: CLASSIFICATION ,

Line 1314: END IEM_CLASSIFICATIONS_PVT;

1310: x_return_Status:='E';
1311:
1312: END;
1313:
1314: END IEM_CLASSIFICATIONS_PVT;