The following lines contain the word 'select', 'insert', 'update' or 'delete':
PROCEDURE update_jtf_perz_lf_object (
x_object_id IN OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_parent_id IN NUMBER,
x_application_id IN NUMBER,
x_object_description IN VARCHAR2,
x_rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
p_OBJECT_VERSION_NUMBER IN NUMBER
) IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_LF_OBJECT
WHERE object_id = x_object_id;
update JTF_PERZ_LF_OBJECT
set parent_id = decode( x_parent_id, FND_API.G_MISS_NUM,parent_id,
NULL, parent_id, x_parent_id),
object_description = decode( x_object_description, FND_API.G_MISS_CHAR,
object_description, NULL, object_description, x_object_description),
OBJECT_VERSION_NUMBER = decode (p_OBJECT_VERSION_NUMBER, FND_API.G_MISS_NUM,
OBJECT_VERSION_NUMBER, p_OBJECT_VERSION_NUMBER+1),
LAST_UPDATE_DATE = SYSDATE,
LAST_UPDATED_BY = FND_GLOBAL.USER_ID,
LAST_UPDATE_LOGIN = FND_GLOBAL.CONC_LOGIN_ID
WHERE object_id = x_object_id
and OBJECT_VERSION_NUMBER = p_OBJECT_VERSION_NUMBER;
end update_jtf_perz_lf_object;
PROCEDURE update_jtf_perz_lf_obj_type (
x_object_type_desc IN VARCHAR2,
x_object_type_id IN OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
p_OBJECT_VERSION_NUMBER IN NUMBER
)IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_LF_OBJECT_TYPE
where object_type_id = x_object_type_id;
Update JTF_PERZ_LF_OBJECT_TYPE
SET
OBJECT_TYPE_DESC =
decode( x_object_type_desc, FND_API.G_MISS_CHAR,
OBJECT_TYPE_DESC,x_object_type_desc),
OBJECT_VERSION_NUMBER = decode (p_OBJECT_VERSION_NUMBER, FND_API.G_MISS_NUM,
OBJECT_VERSION_NUMBER, p_OBJECT_VERSION_NUMBER+1),
LAST_UPDATE_DATE = SYSDATE,
LAST_UPDATED_BY = FND_GLOBAL.USER_ID,
LAST_UPDATE_LOGIN = FND_GLOBAL.CONC_LOGIN_ID
where object_type_id = x_object_type_id
and OBJECT_VERSION_NUMBER = p_OBJECT_VERSION_NUMBER;
END update_jtf_perz_lf_obj_type;
PROCEDURE update_jtf_perz_lf_value(
x_Rowid IN OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_value_id IN OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_PROFILE_ID IN NUMBER,
x_MAP_ID IN NUMBER,
x_ATTRIBUTE_VALUE IN VARCHAR2,
x_ACTIVE_FLAG IN VARCHAR2,
x_PRIORITY IN NUMBER,
p_OBJECT_VERSION_NUMBER IN NUMBER
) IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_LF_VALUE
WHERE PERZ_LF_VALUE_ID = x_VALUE_ID;
Update JTF_PERZ_LF_VALUE
SET
PROFILE_ID = decode( x_PROFILE_ID, FND_API.G_MISS_NUM,PROFILE_ID,x_PROFILE_ID),
OBJ_MAP_ID = decode( x_MAP_ID, FND_API.G_MISS_NUM,OBJ_MAP_ID,x_MAP_ID),
ATTRIBUTE_VALUE = decode( x_ATTRIBUTE_VALUE, FND_API.G_MISS_CHAR,ATTRIBUTE_VALUE,x_ATTRIBUTE_VALUE),
ACTIVE_FLAG = decode( x_ACTIVE_FLAG, FND_API.G_MISS_CHAR,ACTIVE_FLAG,x_ACTIVE_FLAG),
PRIORITY = decode( x_PRIORITY, FND_API.G_MISS_NUM,PRIORITY,x_PRIORITY),
OBJECT_VERSION_NUMBER = decode (p_OBJECT_VERSION_NUMBER, FND_API.G_MISS_NUM,
OBJECT_VERSION_NUMBER, p_OBJECT_VERSION_NUMBER+1),
LAST_UPDATE_DATE = SYSDATE,
LAST_UPDATED_BY = FND_GLOBAL.USER_ID,
LAST_UPDATE_LOGIN = FND_GLOBAL.CONC_LOGIN_ID
where PERZ_LF_VALUE_ID = x_value_id;
END update_jtf_perz_lf_value;
PROCEDURE insert_jtf_perz_obj_map(
x_Rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_OBJ_MAP_ID IN OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_TYPE_MAP_ID IN NUMBER,
x_OBJECT_ID IN NUMBER
) IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_OBJ_MAP
WHERE OBJ_MAP_ID = x_OBJ_MAP_ID;
CURSOR C2 IS SELECT JTF_PERZ_OBJ_MAP_s.nextval FROM sys.dual;
INSERT INTO JTF_PERZ_OBJ_MAP(
OBJ_MAP_ID,
MAP_ID,
OBJECT_ID,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
) VALUES (
x_OBJ_MAP_ID,
decode(x_TYPE_MAP_ID,FND_API.G_MISS_NUM, NULL,x_TYPE_MAP_ID),
decode( x_OBJECT_ID, FND_API.G_MISS_NUM, NULL,x_OBJECT_ID),
G_USER_ID, SYSDATE, G_USER_ID, G_LOGIN_ID);
End insert_jtf_perz_obj_map;
PROCEDURE Insert_jtf_perz_lf_value(
x_Rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_VALUE_ID IN OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_PROFILE_ID IN NUMBER,
x_MAP_ID IN NUMBER,
x_ATTRIBUTE_VALUE IN VARCHAR2,
x_ACTIVE_FLAG IN VARCHAR2,
x_PRIORITY IN NUMBER
) IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_LF_VALUE
WHERE PERZ_LF_VALUE_ID = x_VALUE_ID;
CURSOR C2 IS SELECT JTF_PERZ_LF_VALUE_s.nextval FROM sys.dual;
INSERT INTO JTF_PERZ_LF_VALUE(
PERZ_LF_VALUE_ID,
PROFILE_ID,
OBJ_MAP_ID,
ATTRIBUTE_VALUE,
ACTIVE_FLAG,
PRIORITY,
OBJECT_VERSION_NUMBER,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
) VALUES (
x_VALUE_ID,
x_PROFILE_ID,
decode( x_MAP_ID, FND_API.G_MISS_NUM, NULL,x_MAP_ID),
decode( x_ATTRIBUTE_VALUE, FND_API.G_MISS_CHAR, NULL,x_ATTRIBUTE_VALUE),
decode( x_ACTIVE_FLAG, FND_API.G_MISS_CHAR, NULL,x_ACTIVE_FLAG),
decode( x_PRIORITY, FND_API.G_MISS_NUM, NULL,x_PRIORITY),
1,G_USER_ID, SYSDATE, G_USER_ID, G_LOGIN_ID);
End Insert_jtf_perz_lf_value;
PROCEDURE insert_jtf_perz_obj_type_map(
x_Rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_MAP_ID OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_OBJECT_TYPE_ID IN NUMBER,
x_ATTRIBUTE_ID IN NUMBER
) IS
CURSOR C IS SELECT rowid FROM jtf_perz_obj_type_map
WHERE obj_type_map_id = x_MAP_ID;
CURSOR C2 IS SELECT jtf_perz_obj_type_map_s.nextval FROM sys.dual;
INSERT INTO jtf_perz_obj_type_map(
obj_type_map_id,
OBJECT_TYPE_ID,
ATTRIBUTE_ID,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
) VALUES (
x_MAP_ID,
decode( x_OBJECT_TYPE_ID, FND_API.G_MISS_NUM, NULL,x_OBJECT_TYPE_ID),
decode( x_ATTRIBUTE_ID, FND_API.G_MISS_NUM, NULL,x_ATTRIBUTE_ID),
G_USER_ID, SYSDATE, G_USER_ID, G_LOGIN_ID);
End insert_jtf_perz_obj_type_map;
PROCEDURE update_row_jtf_perz_lf_attrib(
x_Rowid IN OUT VARCHAR2,
x_ATTRIBUTE_ID IN NUMBER,
x_ATTRIBUTE_NAME IN VARCHAR2,
x_ATTRIBUTE_TYPE IN VARCHAR2
) IS
BEGIN
Update JTF_PERZ_LF_ATTRIB
SET
ATTRIBUTE_ID = decode( x_ATTRIBUTE_ID, FND_API.G_MISS_NUM,ATTRIBUTE_ID,x_ATTRIBUTE_ID),
ATTRIBUTE_NAME = decode( x_ATTRIBUTE_NAME, FND_API.G_MISS_CHAR,ATTRIBUTE_NAME,x_ATTRIBUTE_NAME),
ATTRIBUTE_TYPE = decode( x_ATTRIBUTE_TYPE, FND_API.G_MISS_CHAR,ATTRIBUTE_TYPE,x_ATTRIBUTE_TYPE)
where rowid = X_RowId;
END update_row_jtf_perz_lf_attrib;
PROCEDURE insert_jtf_perz_lf_attrib(
x_Rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_ATTRIBUTE_ID OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_ATTRIBUTE_NAME IN VARCHAR2,
x_ATTRIBUTE_TYPE IN VARCHAR2
) IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_LF_ATTRIB
WHERE ATTRIBUTE_ID = x_ATTRIBUTE_ID;
CURSOR C2 IS SELECT JTF_PERZ_LF_ATTRIB_s.nextval FROM sys.dual;
INSERT INTO JTF_PERZ_LF_ATTRIB(
ATTRIBUTE_ID,
ATTRIBUTE_NAME,
ATTRIBUTE_TYPE,
OBJECT_VERSION_NUMBER,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
)
VALUES (
x_ATTRIBUTE_ID,
decode( x_ATTRIBUTE_NAME, FND_API.G_MISS_CHAR, NULL,x_ATTRIBUTE_NAME),
decode( x_ATTRIBUTE_TYPE, FND_API.G_MISS_CHAR, NULL,x_ATTRIBUTE_TYPE),
1,G_USER_ID, SYSDATE, G_USER_ID, G_LOGIN_ID
);
End insert_jtf_perz_lf_attrib;
PROCEDURE Insert_jtf_perz_lf_obj_type(
x_Rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_OBJECT_TYPE_ID IN OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_OBJECT_TYPE IN VARCHAR2,
x_OBJECT_TYPE_DESC IN VARCHAR2
) IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_LF_OBJECT_TYPE
WHERE OBJECT_TYPE_ID = x_OBJECT_TYPE_ID;
CURSOR C2 IS SELECT JTF_PERZ_LF_OBJ_TYPE_s.nextval FROM sys.dual;
INSERT INTO JTF_PERZ_LF_OBJECT_TYPE(
OBJECT_TYPE_ID,
OBJECT_TYPE_NAME,
OBJECT_TYPE_DESC,
OBJECT_VERSION_NUMBER,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
)
VALUES (
x_OBJECT_TYPE_ID,
decode( x_OBJECT_TYPE, FND_API.G_MISS_CHAR, NULL,x_OBJECT_TYPE),
decode( x_OBJECT_TYPE_DESC, FND_API.G_MISS_CHAR, NULL,x_OBJECT_TYPE_DESC),
1, G_USER_ID, SYSDATE, G_USER_ID, G_LOGIN_ID
);
End Insert_jtf_perz_lf_obj_type;
PROCEDURE Insert_jtf_perz_lf_object(
x_Rowid OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_OBJECT_ID IN OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_PARENT_ID IN NUMBER,
x_APPLICATION_ID IN NUMBER,
x_OBJECT_NAME IN VARCHAR2,
x_OBJECT_DESCRIPTION IN VARCHAR2
) IS
CURSOR C IS SELECT rowid FROM JTF_PERZ_LF_OBJECT
WHERE OBJECT_ID = x_OBJECT_ID;
CURSOR C2 IS SELECT JTF_PERZ_LF_OBJECT_s.nextval FROM sys.dual;
INSERT INTO JTF_PERZ_LF_OBJECT(
OBJECT_ID,
PARENT_ID,
APPLICATION_ID,
OBJECT_NAME,
OBJECT_DESCRIPTION,
OBJECT_VERSION_NUMBER,
CREATED_BY,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
LAST_UPDATE_LOGIN
)
VALUES (
x_OBJECT_ID,
decode( x_PARENT_ID, FND_API.G_MISS_NUM, NULL,x_PARENT_ID),
decode( x_APPLICATION_ID, FND_API.G_MISS_NUM, NULL,x_APPLICATION_ID),
decode( x_OBJECT_NAME, FND_API.G_MISS_CHAR, NULL,x_OBJECT_NAME),
decode( x_OBJECT_DESCRIPTION, FND_API.G_MISS_CHAR, NULL,x_OBJECT_DESCRIPTION),
1, G_USER_ID, SYSDATE, G_USER_ID, G_LOGIN_ID
);
End Insert_jtf_perz_lf_object;
select rowid, attribute_id
into x_rowid, x_attribute_id
from jtf_perz_lf_attrib
where attribute_name = p_attribute_name
and attribute_type = p_attribute_type;
select rowid, attribute_id
into x_rowid, x_attribute_id
from jtf_perz_lf_attrib
where attribute_id = l_attribute_id;
select object_type_id, object_version_number
into l_object_type_id, x_object_version_number
from jtf_perz_lf_object_type
where object_type_name = p_object_type;
select object_type_id, object_version_number
into l_object_type_id, x_object_version_number
from jtf_perz_lf_object_type
where object_type_id = x_object_type_id ;
select object_type_id, object_version_number
into l_object_type_id, x_object_version_number
from jtf_perz_lf_object_type
where object_type_id = x_object_type_id;
select object_id, object_version_number
into l_object_id, x_object_version_number
from jtf_perz_lf_object
where object_name = p_object_name
and application_id = p_application_id;
select object_id, object_version_number
into l_object_id, x_object_version_number
from jtf_perz_lf_object
where object_id = x_object_id
and application_id = p_application_id;
select object_id, object_version_number
into l_object_id, x_object_version_number
from jtf_perz_lf_object
where object_id = x_object_id and
object_name = p_object_name
and application_id = p_application_id;
SELECT a.attribute_id, b.attribute_name, b.attribute_type
from jtf_perz_obj_type_map a, jtf_perz_lf_attrib b
where a.object_type_id = p_object_type_id
and a.attribute_id = b.attribute_id;
select object_type_id, object_type_desc
into l_object_type_id, x_object_type_desc
from jtf_perz_lf_object_type
where object_type_id = p_object_type_id;
select object_type_id, object_type_desc
into l_object_type_id, x_object_type_desc
from jtf_perz_lf_object_type
where object_type_name = p_object_type;
Insert_jtf_perz_lf_object(
l_rowid,
l_object_id,
p_parent_id,
p_application_id,
p_object_name,
l_object_description
);
select a.obj_type_map_id
into l_type_map_id
from jtf_perz_obj_type_map a, jtf_perz_lf_attrib b
where object_type_id = l_object_type_id
and attribute_name = l_attrib_value_tbl(l_curr_row).attribute_name
and attribute_type = l_attrib_value_tbl(l_curr_row).attribute_type
and a.attribute_id = b.attribute_id
and a.object_type_id = l_object_type_id;
--dbms_output.put_line('In 1st select 1 exception');
--dbms_output.put_line('In 1st select 2 exception');
select a.obj_type_map_id
into l_type_map_id
from jtf_perz_obj_type_map a
where a.object_type_id = l_object_type_id
and a.attribute_id = l_attrib_value_tbl(l_curr_row).attribute_id;
--dbms_output.put_line('In 2nd select 1 exception');
--dbms_output.put_line('In 2nd select 2 exception');
insert_jtf_perz_obj_map(
l_rowid,
l_obj_map_id,
l_type_map_id,
l_object_id
);
--dbms_output.put_line('In insert into obj map error');
insert_jtf_perz_lf_value(
l_rowid,
l_value_id,
l_profile_id,
l_obj_map_id,
l_attrib_value_tbl(l_curr_row).attribute_value,
l_active_flag,
l_attrib_value_tbl(l_curr_row).priority
);
--dbms_output.put_line('In insert into lf value error');
PROCEDURE Update_lf_object
( 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_profile_id IN NUMBER,
p_profile_name IN VARCHAR2 := NULL,
p_application_id IN NUMBER,
p_parent_id IN NUMBER := NULL,
p_object_Id IN NUMBER,
p_object_name IN VARCHAR2 := NULL,
p_active_flag IN VARCHAR2,
p_object_type_id IN NUMBER,
p_object_type IN VARCHAR2 := NULL,
p_attrib_value_tbl IN JTF_PERZ_LF_PUB.ATTRIB_VALUE_TBL_TYPE
:= JTF_PERZ_LF_PUB.G_MISS_ATTRIB_VALUE_TBL,
x_object_id OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_return_status OUT NOCOPY /* file.sql.39 change */ VARCHAR2,
x_msg_count OUT NOCOPY /* file.sql.39 change */ NUMBER,
x_msg_data OUT NOCOPY /* file.sql.39 change */ VARCHAR2
)IS
-- ******* Update_lf_object Local Variables - Standards ********
l_api_name VARCHAR2(60) := 'Update Object';
SAVEPOINT UPDATE_PERZ_LF_PVT;
-- Update the object with the parent id
update_jtf_perz_lf_object (
l_object_id,
l_parent_id,
p_application_id,
l_object_description,
l_rowid,
l_object_version_number
) ;
-- insert row into the attribute table
-- Enhancement 1097254 Begins
l_rowid := NULL;
insert_jtf_perz_lf_attrib(
l_rowid,
l_attribute_id,
l_attrib_value_tbl(l_curr_row).attribute_name,
l_attrib_value_tbl(l_curr_row).attribute_type
);
-- raising the error if unable to insert the attribute record
RAISE FND_API.G_EXC_ERROR;
insert_jtf_perz_obj_type_map(
l_rowid,
l_map_id,
l_object_type_id,
l_attribute_id
);
-- raising the error if unable to insert the map record
RAISE FND_API.G_EXC_ERROR;
select d.perz_lf_value_id, d.obj_map_id, d.attribute_value,
d.active_flag, d.priority, object_version_number
into l_value_id, l_obj_map_id,
l_db_attrib_value_tbl(l_curr_row).attribute_value,
l_db_active_flag,
l_db_attrib_value_tbl(l_curr_row).priority,
l_obj_value_ver_no
from jtf_perz_lf_value d, jtf_perz_obj_map e,
jtf_perz_obj_type_map f
where
e.object_id = l_object_id
and f.object_type_id = l_object_type_id
and f.attribute_id = l_attribute_id
and d.profile_id = l_profile_id
and e.map_id = f.obj_type_map_id
and e.obj_map_id = d.obj_map_id;
update_jtf_perz_lf_value
( l_rowid,
l_value_id,
l_profile_id,
l_obj_map_id,
l_attrib_value_tbl(l_curr_row).attribute_value,
l_active_flag,
l_attrib_value_tbl(l_curr_row).priority,
l_obj_value_ver_no);
-- insert table handlers must be called for
-- value and object map here - Srikanth
-- Check if the attribute - object type map exists
-- if yes
-- call the table handler for object map
-- with appropriate map id
-- pass the obj_map_id to insert_jtf_perz_lf_value()
-- if not raise error
-- Checking the attribute - object type map
BEGIN
l_map_id := NULL;
select obj_type_map_id into l_map_id
from jtf_perz_obj_type_map
where attribute_id = l_attribute_id
and object_type_id = l_object_type_id;
select OBJ_MAP_ID into l_obj_map_id
from jtf_perz_obj_map
where MAP_ID = l_map_id
and OBJECT_ID = l_object_id;
insert_jtf_perz_obj_map(
l_rowid,
l_obj_map_id,
l_map_id,
l_object_id
);
--dbms_output.put_line('while inserting object map');
insert_jtf_perz_lf_value(
l_rowid,
l_value_id,
l_profile_id,
l_obj_map_id,
l_attrib_value_tbl(l_curr_row).attribute_value,
l_active_flag,
l_attrib_value_tbl(l_curr_row).priority
);
ROLLBACK TO UPDATE_PERZ_LF_PVT;
ROLLBACK TO UPDATE_PERZ_LF_PVT;
ROLLBACK TO UPDATE_PERZ_LF_PVT;
END Update_LF_Object;
Update_lf_object(
p_api_version_number => l_api_version_number,
p_init_msg_list => l_init_msg_list,
p_commit => l_commit,
p_profile_id => l_profile_id,
p_profile_name => p_profile_name,
p_application_id => p_application_id,
p_parent_id => p_parent_id,
p_object_id => l_object_id,
p_object_name => l_object_name,
p_active_flag => l_active_flag,
p_object_type_id => l_object_type_id,
p_object_type => l_object_type,
p_attrib_value_tbl => l_attrib_value_tbl,
x_object_id => l_out_object_id,
x_return_status => l_return_status,
x_msg_count => x_msg_count,
x_msg_data => x_msg_data
);
select /*+ first_rows */
d.perz_lf_value_id, a.parent_id, a.object_id, a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f
where
a.parent_id = p_object_id
and a.application_id = p_application_id
and d.profile_id = p_profile_id
and d.active_flag = p_active_flag
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
select /*+ first_rows */
d.perz_lf_value_id, a.parent_id, a.object_id, a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f,
jtf_perz_profile p
where
a.parent_id = p_object_id
and a.application_id = p_application_id
and d.profile_id = p.profile_id
and d.active_flag = p_active_flag
and p.profile_name = p_profile_name
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
select d.perz_lf_value_id, a.parent_id, a.object_id, a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f,
jtf_perz_lf_object o, jtf_perz_profile p
where
o.object_name = p_object_name
and o.object_id = a.parent_id
and a.application_id = p_application_id
and d.profile_id = p.profile_id
and d.active_flag = p_active_flag
and p.profile_name = p_profile_name
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
select d.perz_lf_value_id, a.parent_id, a.object_id, a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f,
jtf_perz_lf_object o
where
o.object_name = p_object_name
and o.object_id = a.parent_id
and a.application_id = p_application_id
and d.profile_id = p_profile_id
and d.active_flag = p_active_flag
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
select d.perz_lf_value_id, a.parent_id, a.object_id,
a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f
where
a.object_id = p_object_id
and a.application_id = p_application_id
and d.profile_id = p_profile_id
and d.active_flag = p_active_flag
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
select d.perz_lf_value_id, a.parent_id, a.object_id,
a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f,
jtf_perz_profile p
where
a.object_id = p_object_id
and a.application_id = p_application_id
and d.profile_id = p.profile_id
and p.profile_name = p_profile_name
and d.active_flag = p_active_flag
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
select d.perz_lf_value_id, a.parent_id, a.object_id,
a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f,
jtf_perz_profile p
where
a.object_name = p_object_name
and a.application_id = p_application_id
and d.profile_id = p.profile_id
and p.profile_name = p_profile_name
and d.active_flag = p_active_flag
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
select d.perz_lf_value_id, a.parent_id, a.object_id,
a.application_id, a.object_name,
a.object_description, b.object_type_id, b.object_type_name,
c.attribute_id, c.attribute_name, c.attribute_type,
d.attribute_value, d.active_flag, d.priority
from jtf_perz_lf_object a, jtf_perz_lf_object_type b,
jtf_perz_lf_attrib c, jtf_perz_lf_value d,
jtf_perz_obj_map e, jtf_perz_obj_type_map f
where
a.object_name = p_object_name
and a.application_id = p_application_id
and d.profile_id = p_profile_id
and d.active_flag = p_active_flag
and e.object_id = a.object_id
and e.obj_map_id = d.obj_map_id
and e.map_id = f.obj_type_map_id
and f.object_type_id = b.object_type_id
and f.attribute_id = c.attribute_id
ORDER BY a.object_id;
l_inserted_map NUMBER := 0;
update_jtf_perz_lf_obj_type(
l_object_type_desc,
l_object_type_id,
l_rowid,
l_obj_type_version_no
);
insert_jtf_perz_lf_attrib(
l_rowid,
l_attribute_id,
l_attrib_rec_tbl(l_curr_row).attribute_name,
l_attrib_rec_tbl(l_curr_row).attribute_type
);
-- unable to insert the attribute record
RAISE FND_API.G_EXC_ERROR;
-- inserting record in x_obj_type_map_tbl for output
x_obj_type_map_tbl(l_inserted_map).ATTRIBUTE_ID := l_attribute_id;
x_obj_type_map_tbl(l_inserted_map).OBJECT_TYPE_ID := l_object_type_id;
select obj_type_map_id into x_obj_type_map_tbl(l_inserted_map).TYPE_MAP_ID
from jtf_perz_obj_type_map
where object_type_id = l_object_type_id
and attribute_id = l_attribute_id;
l_inserted_map := l_inserted_map + 1;
insert_jtf_perz_obj_type_map(
l_rowid,
l_map_id,
l_object_type_id,
l_attribute_id
);
-- raising the error if unable to insert the map record
RAISE FND_API.G_EXC_ERROR;
-- inserting record in x_obj_type_map_tbl for output
x_obj_type_map_tbl(l_inserted_map).TYPE_MAP_ID := l_map_id;
l_inserted_map := l_inserted_map + 1;
Insert_JTF_PERZ_LF_OBJ_TYPE(
l_Rowid,
l_OBJECT_TYPE_ID,
l_OBJECT_TYPE,
l_OBJECT_TYPE_DESC
);
SELECT attribute_id INTO l_attribute_id
FROM JTF_PERZ_LF_ATTRIB
WHERE attribute_name = p_attrib_rec_tbl(l_curr_row).ATTRIBUTE_NAME and
attribute_type = p_attrib_rec_tbl(l_curr_row).ATTRIBUTE_TYPE;
-- insert row into the attribute table
l_rowid := NULL;
insert_jtf_perz_lf_attrib(
l_rowid,
l_attribute_id,
l_attrib_rec_tbl(l_curr_row).attribute_name,
l_attrib_rec_tbl(l_curr_row).attribute_type
);
-- raising the error if unable to insert the attribute record
RAISE FND_API.G_EXC_ERROR;
insert_jtf_perz_obj_type_map(
l_rowid,
l_map_id,
l_object_type_id,
l_attribute_id
);
-- raising the error if unable to insert the map record
RAISE FND_API.G_EXC_ERROR;
-- inserting record in x_obj_type_map_tbl for output
x_obj_type_map_tbl(l_inserted_map).ATTRIBUTE_ID := l_attribute_id;
x_obj_type_map_tbl(l_inserted_map).OBJECT_TYPE_ID := l_object_type_id;
x_obj_type_map_tbl(l_inserted_map).TYPE_MAP_ID := l_map_id;
l_inserted_map := l_inserted_map + 1;