89: and jtf_auth_parent_principal_id = r_id
90: and jtf_auth_domain_id = d_id;
91:
92: select count(*) into maps_sources
93: from jtf_auth_maps_sources a
94: where a.jtf_auth_principal_mapping_id = mapping_id
95: and a.ownertable_name = 'JTF_AUTH_PRINCIPALS_B'
96: and a.ownertable_key = TO_CHAR(p_id);
97:
95: and a.ownertable_name = 'JTF_AUTH_PRINCIPALS_B'
96: and a.ownertable_key = TO_CHAR(p_id);
97:
98: if maps_sources=0 then
99: insert into jtf_auth_maps_sources (JTF_AUTH_MAPS_SOURCE_ID,
100: JTF_AUTH_PRINCIPAL_MAPPING_ID, OWNERTABLE_NAME, OWNERTABLE_KEY,
101: CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE,
102: APPLICATION_ID, OBJECT_VERSION_NUMBER) VALUES
103: (source_id, mapping_id, 'JTF_AUTH_PRINCIPALS_B',
220: and jtf_auth_parent_principal_id = r_id
221: and jtf_auth_domain_id = d_id;
222:
223: select count(*) into maps_sources
224: from jtf_auth_maps_sources a
225: where a.jtf_auth_principal_mapping_id = mapping_id
226: and a.ownertable_name = U_OWNERTABLE_NAME
227: and a.ownertable_key = key;
228:
226: and a.ownertable_name = U_OWNERTABLE_NAME
227: and a.ownertable_key = key;
228:
229: if maps_sources=0 then
230: insert into jtf_auth_maps_sources (JTF_AUTH_MAPS_SOURCE_ID,
231: JTF_AUTH_PRINCIPAL_MAPPING_ID, OWNERTABLE_NAME, OWNERTABLE_KEY,
232: CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE,
233: APPLICATION_ID, OBJECT_VERSION_NUMBER) VALUES
234: (source_id, mapping_id, U_OWNERTABLE_NAME,
335: and jtf_auth_parent_principal_id = r_id
336: and jtf_auth_domain_id = d_id;
337:
338: select count(*) into maps_sources
339: from jtf_auth_maps_sources a
340: where a.jtf_auth_principal_mapping_id = mapping_id
341: and a.ownertable_name = 'JTF_AUTH_PRINCIPALS_B'
342: and a.ownertable_key = TO_CHAR(p_id);
343:
341: and a.ownertable_name = 'JTF_AUTH_PRINCIPALS_B'
342: and a.ownertable_key = TO_CHAR(p_id);
343:
344: if maps_sources=0 then
345: insert into jtf_auth_maps_sources (JTF_AUTH_MAPS_SOURCE_ID,
346: JTF_AUTH_PRINCIPAL_MAPPING_ID, OWNERTABLE_NAME, OWNERTABLE_KEY,
347: CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE,
348: APPLICATION_ID, OBJECT_VERSION_NUMBER) VALUES
349: (source_id, mapping_id, 'JTF_AUTH_PRINCIPALS_B',
467: and jtf_auth_parent_principal_id = r_id
468: and jtf_auth_domain_id = d_id;
469:
470: select count(*) into maps_sources
471: from jtf_auth_maps_sources a
472: where a.jtf_auth_principal_mapping_id = mapping_id
473: and a.ownertable_name = U_OWNERTABLE_NAME
474: and a.ownertable_key = key;
475:
473: and a.ownertable_name = U_OWNERTABLE_NAME
474: and a.ownertable_key = key;
475:
476: if maps_sources=0 then
477: insert into jtf_auth_maps_sources (JTF_AUTH_MAPS_SOURCE_ID,
478: JTF_AUTH_PRINCIPAL_MAPPING_ID, OWNERTABLE_NAME, OWNERTABLE_KEY,
479: CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, LAST_UPDATE_DATE,
480: APPLICATION_ID, OBJECT_VERSION_NUMBER) VALUES
481: (source_id, mapping_id, U_OWNERTABLE_NAME,