static protected Model toModelWithoutChildren(SbiKpiModel value,
Session aSession) {
logger.debug("IN");
Model toReturn = new Model();
String name = value.getKpiModelNm();
String description = value.getKpiModelDesc();
String code = value.getKpiModelCd();
String label = value.getKpiModelLabel();
Integer id = value.getKpiModelId();
SbiKpi sbiKpi = value.getSbiKpi();
Integer kpiId = null;
if (sbiKpi != null) {
kpiId = sbiKpi.getKpiId();
}
String typeCd = value.getModelType().getValueCd();
Integer typeId = value.getModelType().getValueId();
String typeName = value.getModelType().getValueNm();
String typeDescription = value.getModelType().getValueDs();
// Put
// add also associated UDP
List udpValues = null;
try {
udpValues = DAOFactory.getUdpDAOValue().findByReferenceId(id, "MODEL");
} catch (EMFUserError e) {
logger.error("Errror in retrieving udp values", e);
}
toReturn.setUdpValues(udpValues);
toReturn.setId(id);
toReturn.setName(name);
toReturn.setDescription(description);
toReturn.setCode(code);
toReturn.setLabel(label);
toReturn.setTypeId(typeId);
toReturn.setTypeCd(typeCd);
toReturn.setTypeName(typeName);
toReturn.setTypeDescription(typeDescription);
toReturn.setChildrenNodes(null);
toReturn.setKpiId(kpiId);
logger.debug("OUT");
return toReturn;
}