/** Custom Method: Valid Values */ public List getValidValues(Object aVdIdseq) throws Exception { NCIBC4JUtil bc4jUtil = new NCIBC4JUtil(); // Vector rows = new Vector(); List rows = null; try { ViewObject view = getValidValuesView(); ViewObjectImpl view1 = (ValidValuesViewImpl) bc4jUtil.cloneViewObject(view); view1.setWhereClause(" VD_IDSEQ = '" + aVdIdseq + "'"); view1.setOrderByClause(" display_order, UPPER(VALUE) "); // view1.setOrderByClause(" UPPER(VALUE) "); // view1.setForwardOnly(true); view1.executeQuery(); rows = new ArrayList(view1.getRowCount()); while (view1.hasNext()) { // rows.add(new ValidValuesValueObject((ValidValuesViewRowImpl) view1.next())); ValidValuesViewRowImpl vvImpl = (ValidValuesViewRowImpl) view1.next(); ValidValue vv = new ValidValueTransferObject(); vv.setVdIdseq(vvImpl.getVdIdseq().trim()); // for 4.0 ShortMeaning is replaced with Long Name and Description with PreferredDefinition vv.setDescription(vvImpl.getPreferredDefinition()); vv.setShortMeaning(vvImpl.getLongName()); vv.setShortMeaningDescription(vvImpl.getMeaningDescription()); vv.setShortMeaningValue(vvImpl.getValue()); vv.setVpIdseq(vvImpl.getVpIdseq().trim()); vv.setVmId(new Integer(vvImpl.getVmId().intValue())); vv.setVmVersion(new Float(vvImpl.getVersion().floatValue())); vv.setBeginDate( (vvImpl.getBeginDate() != null) ? ((Date) vvImpl.getBeginDate().dateValue()).toString() : ""); vv.setEndDate( (vvImpl.getEndDate() != null) ? ((Date) vvImpl.getEndDate().dateValue()).toString() : ""); vv.setContext(vvImpl.getName()); vv.setWorkflowstatus(vvImpl.getAslName()); String cdrIdseq = vvImpl.getCondrIdseq(); if (cdrIdseq != null) { ConceptDerivationRule rule = new ConceptDerivationRuleTransferObject(); rule.setIdseq(cdrIdseq.trim()); vv.setConceptDerivationRule(rule); } rows.add(vv); } } catch (Exception e) { throw e; } return rows; }
public ConceptDerivationRule buildConceptDerivationRuleTransfer( ConceptDerivationRuleModel model) { ConceptDerivationRule rule = new ConceptDerivationRuleTransferObject(); if (model == null) return rule; // FIXME clean up required; not a complete map rule.setIdseq(model.getCondrIdseq()); // FIXME where this data comes from? rule.setComponentConcepts(null); rule.setConcatenationChar(model.getConcatChar()); rule.setMethods(model.getMethods()); // FIXME where does type come from? rule.setType(null); rule.setName(model.getName()); return rule; }