/** * Method getCodesDecodes. * * @return Vector<Decode> * @throws ValueTypeException */ @Override public Vector<Decode> getCodesDecodes() throws ValueTypeException { final Vector<Decode> decodes = new Vector<Decode>(); final Vector<Decode> decodesAll = super.getCodesDecodes(); for (final Decode decode : decodesAll) { final Strategy strategy = (Strategy) decode.getObject(); boolean isMgr = false; if (!strategy.hasStrategyManager()) { for (final Decode mgrdecode : decodesAll) { final Strategy strategyMgr = (Strategy) mgrdecode.getObject(); if (strategyMgr.hasStrategyManager()) { if (strategyMgr.getStrategyManager().equals(strategy)) { isMgr = true; break; } } } } if (!isMgr) { decodes.add(decode); } } return decodes; }
/** * Method getNewRow. * * @param newRow Vector<Object> * @param element Strategy */ public void getNewRow(Vector<Object> newRow, Strategy element) { newRow.addElement(element.getName()); newRow.addElement(element.getDescription()); newRow.addElement(element.getClassName()); if (element.hasStrategyManager()) { newRow.addElement(DAOStrategyManager.newInstance(element.getStrategyManager().getName())); } else { newRow.addElement(DAOStrategyManager.newInstance(Decode.NONE)); } if (null == element.getMarketData()) { newRow.addElement(new YesNo()); } else { newRow.addElement(YesNo.newInstance(element.getMarketData())); } }