// }
// }
private void importParuseDet(Integer parUseOldId) throws EMFUserError {
logger.debug("IN");
SbiParuseDet parusedet = null;
try {
//List exportedParuseDets2 = importer.getAllExportedSbiObjects(sessionExpDB, "SbiParuseDet", null);
List exportedParuseDets = importer.getFilteredExportedSbiObjects(sessionExpDB, "SbiParuseDet", "id.sbiParuse",parUseOldId);
Iterator iterSbiParuseDets = exportedParuseDets.iterator();
while (iterSbiParuseDets.hasNext()) {
parusedet = (SbiParuseDet) iterSbiParuseDets.next();
// get ids of exported role and paruse associzted
Integer paruseid = parusedet.getId().getSbiParuse().getUseId();
Integer roleid = parusedet.getId().getSbiExtRoles().getExtRoleId();
// get association of roles and paruses
Map paruseIdAss = metaAss.getParuseIDAssociation();
Map roleIdAss = metaAss.getRoleIDAssociation();
// try to get from association the id associate to the exported
// metadata
Integer newParuseid = (Integer) paruseIdAss.get(paruseid);
Integer newRoleid = (Integer) roleIdAss.get(roleid);
// build a new SbiParuseDet
SbiParuseDet newParuseDet = ImportUtilities.makeNewSbiParuseDet(parusedet, newParuseid, newRoleid);
// check if the association between metadata already exist
Map unique = new HashMap();
unique.put("paruseid", newParuseid);
unique.put("roleid", newRoleid);
Object existObj = importer.checkExistence(unique, sessionCurrDB, new SbiParuseDet());
if (existObj == null) {
sessionCurrDB.save(newParuseDet);
metaLog.log("Inserted new association between paruse " + parusedet.getId().getSbiParuse().getName()
+ " and role " + parusedet.getId().getSbiExtRoles().getName());
}