@Override public NdcPropertiesListModel getModelInCommon(NdcPropertiesListModel model, boolean analysisMode) throws Exception { if (model == null) { return null; } boolean found = false; NdcPropertiesListModel common = new NdcPropertiesListModel(); if (model.getList() != null && list != null) { // Find common ingredient strength values for (final NdcPropertiesModel in : model.getList()) { for (final NdcPropertiesModel in2 : list) { final NdcPropertiesModel commonProperties = in.getModelInCommon(in2, analysisMode); if (commonProperties != null && !common.getList().contains(commonProperties)) { common.getList().add(commonProperties); } found = true; } } } if (!found) { return null; } return common; }
/** * Instantiates a {@link NdcPropertiesListModel} from the specified * parameters. * * @param model the model */ public NdcPropertiesListModel(NdcPropertiesListModel model) { list = new ArrayList<>(model.getList()); }
if (model != null) { final ScoredResult result = new ScoredResultJpa(); result.setValue(model.getModelValue()); result.setScore(1); results.add(result);
final NdcPropertiesListModel model = new NdcPropertiesListModel(); + atom.getName()); model.getList().add(resultModel); return new NdcPropertiesListModel();