private static void removeIdsFromGrids(List<String> currentGridNames,List<Grid> grids){
  for (  Grid grid : grids) {
    grid.setId(-1);
    for (    GridItem item : grid.getItems())     item.setId(-1);
  }
  for (  Grid grid : grids) {
    if (currentGridNames.contains(grid.getName()))     grid.setName(grid.getName() + " (2)");
  }
}

private static void removeIdsFromGrids ( List < String > currentGridNames , List < Grid > grids ) { for ( Grid grid : grids ) { grid . setId ( - 1 ) ; for ( GridItem item : grid . getItems ( ) ) item . setId ( - 1 ) ; } for ( Grid grid : grids ) { if ( currentGridNames . contains ( grid . getName ( ) ) ) grid . setName ( grid . getName ( ) + " (2)" ) ; } }
removes ids from grids and resolve possible conflicted names
