The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT JTF_PERZ_QUERY_PARAM_S.NEXTVAL
FROM dual;
SELECT 1
FROM JTF_PERZ_QUERY_PARAM
WHERE QUERY_PARAM_ID = l_id;
l_filter_rec.last_updated_by := G_USER_ID;
l_filter_rec.last_update_date := sysdate;
AMS_ADV_FILTER_PKG.Insert_Row
(
px_query_param_id => l_query_param_id,
p_query_id => l_filter_rec.query_id,
p_parameter_name => l_filter_rec.parameter_name,
p_parameter_type => l_filter_rec.parameter_type,
p_parameter_value => l_filter_rec.parameter_value,
p_parameter_condition => l_filter_rec.parameter_condition,
p_parameter_sequence => l_filter_rec.parameter_sequence,
p_created_by => l_filter_rec.created_by,
p_last_updated_by => l_filter_rec.last_updated_by,
p_last_update_date => l_filter_rec.last_update_date,
p_last_update_login => G_LOGIN_ID,
p_security_group_id => l_filter_rec.security_group_id
);
AMS_DM_MODEL_PVT.handle_data_selection_changes(l_obj_id);
AMS_DM_SCORE_PVT.handle_data_selection_changes(l_obj_id);
PROCEDURE Update_Filter_Row(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_filter_rec IN filter_rec_type
)
IS
CURSOR c_get_filter_row(p_query_param_id NUMBER) IS
SELECT *
FROM JTF_PERZ_QUERY_PARAM
WHERE query_param_id = p_query_param_id;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Filter_Row';
SAVEPOINT UPDATE_Filter_Row_PVT;
AMS_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
p_token_name => 'INFO',
p_token_value => 'Filter_Row'
) ;
p_validation_mode => JTF_PLSQL_API.g_update,
p_filter_rec => l_filter_rec,
x_return_status => x_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data);
AMS_UTILITY_PVT.debug_message('Private API: Before Calling Table Update Row');
AMS_ADV_FILTER_PKG.Update_Row(
px_query_param_id => p_filter_rec.query_param_id,
p_query_id => p_filter_rec.query_id,
p_parameter_name => p_filter_rec.parameter_name,
p_parameter_type => p_filter_rec.parameter_type,
p_parameter_value => p_filter_rec.parameter_value,
p_parameter_condition => p_filter_rec.parameter_condition,
p_parameter_sequence => p_filter_rec.parameter_sequence,
p_last_updated_by => G_USER_ID,
p_last_update_date => SYSDATE,
p_last_update_login => G_LOGIN_ID,
p_security_group_id => p_filter_rec.security_group_id
);
AMS_UTILITY_PVT.debug_message('Private API: After Update Row');
AMS_DM_MODEL_PVT.handle_data_selection_changes(l_obj_id);
AMS_DM_SCORE_PVT.handle_data_selection_changes(l_obj_id);
ROLLBACK TO UPDATE_Filter_Row_PVT;
ROLLBACK TO UPDATE_Filter_Row_PVT;
ROLLBACK TO UPDATE_Filter_Row_PVT;
End Update_Filter_Row;
PROCEDURE Delete_Filter_Row
(
p_api_version_number IN NUMBER,
p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
p_commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_query_param_id IN NUMBER
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'Delete_Filter_Row';
SELECT parameter_type
FROM JTF_PERZ_QUERY_PARAM
WHERE query_param_id = p_query_param_id;
SAVEPOINT DELETE_Filter_Row_PVT;
AMS_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
AMS_ADV_FILTER_PKG.Delete_Row(
p_query_param_id => p_query_param_id);
AMS_DM_MODEL_PVT.handle_data_selection_changes(l_obj_id);
AMS_DM_SCORE_PVT.handle_data_selection_changes(l_obj_id);
ROLLBACK TO DELETE_Filter_Row_PVT;
ROLLBACK TO DELETE_Filter_Row_PVT;
ROLLBACK TO DELETE_Filter_Row_PVT;
End Delete_Filter_Row;
IF p_filter_rec.last_updated_by = FND_API.g_miss_num OR p_filter_rec.last_updated_by IS NULL THEN
FND_MESSAGE.set_name('AMS', 'AMS_API_MISSING_FIELD');
FND_MESSAGE.set_token('MISS_FIELD','LAST_UPDATED_BY');
IF p_filter_rec.last_update_date = FND_API.g_miss_date OR p_filter_rec.last_update_date IS NULL THEN
FND_MESSAGE.set_name('AMS', 'AMS_API_MISSING_FIELD');
FND_MESSAGE.set_token('MISS_FIELD','LAST_UPDATE_DATE');
SELECT *
FROM jtf_perz_query_param
WHERE query_param_id = p_filter_rec.query_param_id ;
IF p_filter_rec.last_updated_by = FND_API.g_miss_num THEN
x_complete_rec.last_updated_by := l_filter_rec.last_updated_by;
IF p_filter_rec.last_update_date = FND_API.g_miss_date THEN
x_complete_rec.last_update_date := l_filter_rec.last_update_date;
IF p_filter_rec.last_update_login = FND_API.g_miss_num THEN
x_complete_rec.last_update_login := l_filter_rec.last_update_login;
SELECT qry.query_id
FROM JTF_PERZ_PROFILE profile, JTF_PERZ_QUERY qry
WHERE profile.profile_name = 'AMS_DEFAULT_PROFILE'
AND profile.profile_id = qry.profile_id
AND qry.query_name = 'advancedFilter';
SELECT QParam.query_param_id ,QParam.parameter_name,QParam.parameter_type,QParam.parameter_value
,QParam.parameter_condition,QParam.parameter_sequence,QParam.created_by,QParam.last_updated_by
,QParam.last_update_date,QParam.last_update_login
FROM JTF_PERZ_QUERY Query, JTF_PERZ_QUERY_PARAM QParam, AMS_LIST_SRC_FIELDS Fields
WHERE (Query.query_id = l_qid
AND QParam.parameter_type = l_ptype
AND QParam.parameter_name = fields.list_source_field_id
AND Query.query_id = QParam.query_id );
/* SELECT query_param_id ,parameter_name,parameter_type,parameter_value
,parameter_condition,parameter_sequence,created_by,last_updated_by
,last_update_date,last_update_login
FROM jtf_perz_query_param
WHERE query_id = l_qid
AND parameter_type = l_ptype;
SELECT b.source_object_name || '.' || a.source_column_name
FROM ams_list_src_fields_vl a , ams_list_src_types b , ams_list_src_types d
WHERE a.list_source_field_id = l_fieldId
AND a.list_source_type_id = b.list_source_type_id
AND d.list_source_type_id = p_ds_id
AND d.enabled_flag = 'Y'
AND a.enabled_flag = 'Y'
AND b.enabled_flag = 'Y'
AND (EXISTS (SELECT 1 from ams_list_src_type_assocs c WHERE c.master_source_type_id = p_ds_id
AND c.sub_source_type_id = b.list_source_type_id AND c.enabled_flag = 'Y')
OR b.list_source_type_id = p_ds_id)
;
l_filterRec.last_updated_by := l_curfilterRec.last_updated_by;
l_filterRec.last_update_date := l_curfilterRec.last_update_date;
l_filterRec.last_update_login := l_curfilterRec.last_update_login;
SELECT *
FROM JTF_PERZ_QUERY_PARAM
WHERE query_param_id = p_query_param_id;
SELECT to_char(list_source_field_id)
FROM ams_list_src_fields_vl
WHERE source_column_name = SUBSTR(p_fieldName , INSTR(p_fieldName , '.') + 1)
AND list_source_type_id = p_ds_id
;
SELECT Fields.LIST_SOURCE_TYPE_ID
FROM JTF_PERZ_QUERY_PARAM QParam, AMS_LIST_SRC_FIELDS fields
WHERE (QParam.QUERY_PARAM_ID = p_query_param_id AND QParam.parameter_name = fields.list_source_field_id );
l_new_filter_rec.last_updated_by := G_USER_ID;
l_new_filter_rec.last_update_date := SYSDATE;