long levelId=Long.parseLong(levelIdParameter);
ArrayList<AOGGameLevelHiber> levels=AOGGameLevelDao.getOrderedLevelsForGame(ag.getId(), session);
//change level numbers
AOGGameLevelHiber prevLvl=null;
for (AOGGameLevelHiber gl : levels) {
if (prevLvl!=null)
if (prevLvl.getId()==levelId)
{
//change numbers, persist, that's it
int nr=gl.getLevelNumber();
gl.setLevelNumber(prevLvl.getLevelNumber());
prevLvl.setLevelNumber(nr);
AOGGameLevelDao.updateGameLevel(gl, session);
AOGGameLevelDao.updateGameLevel(prevLvl, session);
break;