void updateMappingType(DBRProgressMonitor monitor) throws DBException { switch (parent.getMappingType()) { case existing: { mappingType = DatabaseMappingType.unspecified; if (parent.getTarget() instanceof DBSEntity) { if (CommonUtils.isEmpty(targetName)) { targetName = source.getName(); } target = DBUtils.findObject( ((DBSEntity) parent.getTarget()).getAttributes(monitor), targetName); if (target != null) { mappingType = DatabaseMappingType.existing; } else { mappingType = DatabaseMappingType.create; } } break; } case create: mappingType = DatabaseMappingType.create; if (CommonUtils.isEmpty(targetName)) { targetName = source.getName(); } break; case skip: mappingType = DatabaseMappingType.skip; break; default: mappingType = DatabaseMappingType.unspecified; break; } }