String[] idsArray = addMenuIds.split(",");
for (int i = 0; i < idsArray.length; i )
{
sql.append("insert into T_USER_MENU(ID_,MENU_ID_,USER_ID_)values(S_USER_MENU.nextval,"
Integer.parseInt(idsArray[i])
","
Integer.parseInt(userId)
");");
}
jdbcDao.execute(sql.toString().split(";"));
public boolean execute(String[] sql)
{
try
{
this.getSimpleJdbcTemplate().getJdbcOperations().batchUpdate(sql);
} catch (DataAccessException e)
{
e.printStackTrace();
return false;
}
return true;
}