public String getName(int id) throws Exception {
ArrayList contents = getContents();
ActionDTO action = (ActionDTO)contents.get(id - 1);
return action.getActionName();
}
for the record getContents makes no guarantees on the order of whats returned. Even if it did that alone wouldn't be enough to make this reliable.