The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT start_date_active, end_date_active
FROM ozf_thresholds_vl
WHERE threshold_id = p_threshold_id;
SELECT OZF_THRESHOLD_RULES_s.NEXTVAL
FROM dual;
SELECT 1 FROM dual
WHERE EXISTS (SELECT 1 FROM OZF_THRESHOLD_RULES_ALL
WHERE THRESHOLD_RULE_ID = l_id);
OZF_THRESHOLD_RULES_PKG.Insert_Row(
px_threshold_rule_id => l_threshold_rule_id,
p_last_update_date => SYSDATE,
p_last_updated_by => NVL(fnd_global.user_id, -1),
p_last_update_login => NVL(fnd_global.conc_login_id, -1),
p_creation_date => SYSDATE,
p_created_by => NVL(fnd_global.user_id, -1),
p_created_from => NULL,
p_request_id => fnd_global.conc_request_id,
p_program_application_id => fnd_global.prog_appl_id,
p_program_id => fnd_global.conc_program_id,
p_program_update_date => SYSDATE,
p_period_type => p_threshold_rule_rec.period_type,
p_enabled_flag => p_threshold_rule_rec.enabled_flag,
p_threshold_calendar =>l_threshold_calendar,
p_start_period_name => p_threshold_rule_rec.start_period_name,
p_end_period_name => p_threshold_rule_rec.end_period_name,
p_threshold_id => p_threshold_rule_rec.threshold_id,
p_start_date => p_threshold_rule_rec.start_date,
p_end_date => p_threshold_rule_rec.end_date,
p_value_limit => p_threshold_rule_rec.value_limit,
p_operator_code => p_threshold_rule_rec.operator_code,
p_percent_amount => p_threshold_rule_rec.percent_amount,
p_base_line => p_threshold_rule_rec.base_line,
p_error_mode => p_threshold_rule_rec.error_mode,
p_repeat_frequency => p_threshold_rule_rec.repeat_frequency,
p_frequency_period => p_threshold_rule_rec.frequency_period,
p_attribute_category => p_threshold_rule_rec.attribute_category,
p_attribute1 => p_threshold_rule_rec.attribute1,
p_attribute2 => p_threshold_rule_rec.attribute2,
p_attribute3 => p_threshold_rule_rec.attribute3,
p_attribute4 => p_threshold_rule_rec.attribute4,
p_attribute5 => p_threshold_rule_rec.attribute5,
p_attribute6 => p_threshold_rule_rec.attribute6,
p_attribute7 => p_threshold_rule_rec.attribute7,
p_attribute8 => p_threshold_rule_rec.attribute8,
p_attribute9 => p_threshold_rule_rec.attribute9,
p_attribute10 => p_threshold_rule_rec.attribute10,
p_attribute11 => p_threshold_rule_rec.attribute11,
p_attribute12 => p_threshold_rule_rec.attribute12,
p_attribute13 => p_threshold_rule_rec.attribute13,
p_attribute14 => p_threshold_rule_rec.attribute14,
p_attribute15 => p_threshold_rule_rec.attribute15,
p_org_id => TO_NUMBER(SUBSTRB(USERENV('CLIENT_INFO'), 1, 10)),
p_security_group_id => p_threshold_rule_rec.security_group_id,
p_converted_days => l_converted_days,
px_object_version_number => l_object_version_number,
p_comparison_type => p_threshold_rule_rec.comparison_type,
p_alert_type => p_threshold_rule_rec.alert_type
);
PROCEDURE Update_Threshold_Rule(
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_threshold_rule_rec IN threshold_rule_rec_type,
x_object_version_number OUT NOCOPY NUMBER
)
IS
CURSOR c_get_threshold_rule(threshold_rule_id NUMBER) IS
SELECT *
FROM OZF_THRESHOLD_RULES_ALL
WHERE THRESHOLD_RULE_ID = threshold_rule_id
AND OBJECT_VERSION_NUMBER =p_threshold_rule_rec.object_version_number ;
L_API_NAME CONSTANT VARCHAR2(30) := 'Update_Threshold_Rule';
SAVEPOINT UPDATE_Threshold_Rule_PVT;
OZF_UTILITY_PVT.debug_message('Private API: - Open Cursor to Select ' || l_tar_threshold_rule_rec.threshold_rule_id);
OZF_Utility_PVT.Error_Message(p_message_name => 'API_MISSING_UPDATE_TARGET',
p_token_name => 'INFO',
p_token_value => 'Threshold_Rule') ;
p_token_value => 'Last_Update_Date') ;
p_validation_mode => JTF_PLSQL_API.g_update,
x_return_status => x_return_status
);
OZF_UTILITY_PVT.debug_message('Private API: Calling update table handler');
OZF_THRESHOLD_RULES_PKG.Update_Row(
p_threshold_rule_id => l_threshold_rule_rec.threshold_rule_id,
p_last_update_date => SYSDATE,
p_last_updated_by => NVL(fnd_global.user_id, -1),
p_last_update_login => NVL(fnd_global.conc_login_id, -1),
p_created_from => l_threshold_rule_rec.created_from,
p_request_id => fnd_global.conc_request_id,
p_program_application_id => fnd_global.prog_appl_id,
p_program_id => fnd_global.conc_program_id,
p_program_update_date => SYSDATE,
p_period_type => l_threshold_rule_rec.period_type,
p_enabled_flag => l_threshold_rule_rec.enabled_flag,
p_start_period_name => l_threshold_rule_rec.start_period_name,
p_threshold_calendar =>l_threshold_rule_rec.threshold_calendar,
p_end_period_name => l_threshold_rule_rec.end_period_name,
p_threshold_id => l_threshold_rule_rec.threshold_id,
p_start_date => l_threshold_rule_rec.start_date,
p_end_date => l_threshold_rule_rec.end_date,
p_value_limit => l_threshold_rule_rec.value_limit,
p_operator_code => l_threshold_rule_rec.operator_code,
p_percent_amount => l_threshold_rule_rec.percent_amount,
p_base_line => l_threshold_rule_rec.base_line,
p_error_mode => l_threshold_rule_rec.error_mode,
p_repeat_frequency => l_threshold_rule_rec.repeat_frequency,
p_frequency_period => l_threshold_rule_rec.frequency_period,
p_attribute_category => l_threshold_rule_rec.attribute_category,
p_attribute1 => l_threshold_rule_rec.attribute1,
p_attribute2 => l_threshold_rule_rec.attribute2,
p_attribute3 => l_threshold_rule_rec.attribute3,
p_attribute4 => l_threshold_rule_rec.attribute4,
p_attribute5 => l_threshold_rule_rec.attribute5,
p_attribute6 => l_threshold_rule_rec.attribute6,
p_attribute7 => l_threshold_rule_rec.attribute7,
p_attribute8 => l_threshold_rule_rec.attribute8,
p_attribute9 => l_threshold_rule_rec.attribute9,
p_attribute10 => l_threshold_rule_rec.attribute10,
p_attribute11 => l_threshold_rule_rec.attribute11,
p_attribute12 => l_threshold_rule_rec.attribute12,
p_attribute13 => l_threshold_rule_rec.attribute13,
p_attribute14 => l_threshold_rule_rec.attribute14,
p_attribute15 => l_threshold_rule_rec.attribute15,
p_org_id => l_threshold_rule_rec.org_id,
p_security_group_id => l_threshold_rule_rec.security_group_id,
p_converted_days => l_converted_days,
px_object_version_number => l_object_version_number,
p_comparison_type => l_threshold_rule_rec.comparison_type,
p_alert_type => l_threshold_rule_rec.alert_type
);
ROLLBACK TO UPDATE_Threshold_Rule_PVT;
ROLLBACK TO UPDATE_Threshold_Rule_PVT;
ROLLBACK TO UPDATE_Threshold_Rule_PVT;
End Update_Threshold_Rule;
PROCEDURE Delete_Threshold_Rule(
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_threshold_rule_id IN NUMBER,
p_object_version_number IN NUMBER
)
IS
L_API_NAME CONSTANT VARCHAR2(30) := 'Delete_Threshold_Rule';
SAVEPOINT DELETE_Threshold_Rule_PVT;
OZF_UTILITY_PVT.debug_message( 'Private API: Calling delete table handler');
OZF_THRESHOLD_RULES_PKG.Delete_Row(
p_THRESHOLD_RULE_ID => p_THRESHOLD_RULE_ID);
ROLLBACK TO DELETE_Threshold_Rule_PVT;
ROLLBACK TO DELETE_Threshold_Rule_PVT;
ROLLBACK TO DELETE_Threshold_Rule_PVT;
End Delete_Threshold_Rule;
SELECT THRESHOLD_RULE_ID
FROM OZF_THRESHOLD_RULES_ALL
WHERE THRESHOLD_RULE_ID = p_THRESHOLD_RULE_ID
AND object_version_number = p_object_version
FOR UPDATE NOWAIT;
SELECT threshold_type
FROM ozf_thresholds_all_b
WHERE threshold_id = p_thres_id;
IF p_threshold_rule_rec.last_update_date = FND_API.g_miss_date OR p_threshold_rule_rec.last_update_date IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_rule_NO_last_update_date');
IF p_threshold_rule_rec.last_updated_by = FND_API.g_miss_num OR p_threshold_rule_rec.last_updated_by IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_rule_NO_last_updated_by');
IF p_threshold_rule_rec.last_update_date IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_rule_NO_last_update_date');
IF p_threshold_rule_rec.last_updated_by IS NULL THEN
OZF_Utility_PVT.Error_Message(p_message_name => 'OZF_threshold_rule_NO_last_updated_by');
SELECT *
FROM ozf_threshold_rules_all
WHERE threshold_rule_id = p_threshold_rule_rec.threshold_rule_id;
IF p_threshold_rule_rec.last_update_date = FND_API.g_miss_date THEN
x_complete_rec.last_update_date := NULL;
IF p_threshold_rule_rec.last_update_date IS NULL THEN
x_complete_rec.last_update_date := l_threshold_rule_rec.last_update_date;
IF p_threshold_rule_rec.last_updated_by = FND_API.g_miss_num THEN
x_complete_rec.last_updated_by := NULL;
IF p_threshold_rule_rec.last_updated_by IS NULL THEN
x_complete_rec.last_updated_by := l_threshold_rule_rec.last_updated_by;
IF p_threshold_rule_rec.last_update_login = FND_API.g_miss_num THEN
x_complete_rec.last_update_login := NULL;
IF p_threshold_rule_rec.last_update_login IS NULL THEN
x_complete_rec.last_update_login := l_threshold_rule_rec.last_update_login;
IF p_threshold_rule_rec.program_update_date = FND_API.g_miss_date THEN
x_complete_rec.program_update_date := NULL;
IF p_threshold_rule_rec.program_update_date IS NULL THEN
x_complete_rec.program_update_date := l_threshold_rule_rec.program_update_date;