return parameter;
}
private ParameterUse recoverParameterUseDetails(SourceBean request, Integer parIdInt, Integer paruseIdInt) throws NumberFormatException, EMFUserError {
ParameterUse paruse = new ParameterUse();
paruse.setUseID(paruseIdInt);
paruse.setId(parIdInt);
List inRequestChecksList = request.getAttributeAsList("paruseCheckId");
List toLoadInParUseCheckList = new ArrayList();
String idTmpStr = null;
for (int i = 0; i < inRequestChecksList.size(); i++) {
idTmpStr = (String) inRequestChecksList.get(i);
toLoadInParUseCheckList.add(DAOFactory.getChecksDAO()
.loadCheckByID(new Integer(idTmpStr)));
}
List inRequestRoleList = request.getAttributeAsList("paruseExtRoleId");
List roles = new ArrayList();
for (int i = 0; i < inRequestRoleList.size(); i++) {
String idRoleStr = (String) inRequestRoleList.get(i);
roles.add(DAOFactory.getRoleDAO().loadByID(new Integer(idRoleStr)));
}
String idLovStr = (String) request.getAttribute("paruseLovId");
if (idLovStr == null || idLovStr.trim().equals("")) idLovStr = "-1";
paruse.setIdLov(Integer.valueOf(idLovStr));
String description = (String) request.getAttribute("paruseDescription");
String name = (String) request.getAttribute("paruseName");
String label = (String) request.getAttribute("paruseLabel");
String selectionType = (String) request.getAttribute("selectionType");
String manInFlag = (String) request.getAttribute("valueSelection");
paruse.setName(name);
paruse.setDescription(description);
paruse.setLabel(label);
if (manInFlag.equals("man_in")) {
paruse.setManualInput(Integer.valueOf("1"));
paruse.setSelectionType(null);
paruse.setMultivalue(false);
} else {
paruse.setManualInput(Integer.valueOf("0"));
paruse.setSelectionType(selectionType);
if (selectionType != null &&
(selectionType.equalsIgnoreCase("LIST") || selectionType.equalsIgnoreCase("COMBOBOX")))
paruse.setMultivalue(false);
else
paruse.setMultivalue(true);
}
paruse.setAssociatedRoles(roles);
paruse.setAssociatedChecks(toLoadInParUseCheckList);
return paruse;
}