private boolean hasTemporaryTables() { try { try (Connection connection = mapContext.getDataManager().getDataSource().getConnection()) { for (ILayer layer : mapContext.getLayers()) { String table = layer.getTableReference(); if (table != null && !table.isEmpty()) { if (JDBCUtilities.isTemporaryTable(connection, table)) { return true; } } } } } catch (SQLException ex) { LOGGER.error(I18N.tr("Error while checking temporary table")); } return false; }