/** * Should I pass the alternate field (or the main field)? * @return index (-1)= next converter, 0 - n = List of converters */ public int getIndexOfConverterToPass(boolean bSetData) { Converter field = this.getTargetField(null); if (m_converterNext == field) return -1; // -1 is the code for the base field. int iIndex = 0; for ( ; ; iIndex++) { // Is this one already on my list? Converter converter = this.getConverterToPass(iIndex); if (converter == null) break; // End of list if (converter == field) return iIndex; // Found } if (field == null) return -1; // Never this.addConverterToPass(field); // Add it, and return iIndex; // Return the index to the new converter. } // Override this /**
/** * Should I pass the alternate field (or the main field)? * @return index (-1)= next converter, 0 - n = List of converters */ public int getIndexOfConverterToPass(boolean bSetData) { Converter field = this.getTargetField(null); if (m_converterNext == field) return -1; // -1 is the code for the base field. int iIndex = 0; for ( ; ; iIndex++) { // Is this one already on my list? Converter converter = this.getConverterToPass(iIndex); if (converter == null) break; // End of list if (converter == field) return iIndex; // Found } if (field == null) return -1; // Never this.addConverterToPass(field); // Add it, and return iIndex; // Return the index to the new converter. } // Override this /**
/** * Should I pass the alternate field (or the main field)? * @return index (-1)= next converter, 0 - n = List of converters */ public int getIndexOfConverterToPass(boolean bSetData) { Converter field = this.getTargetField(null); if (m_converterNext == field) return -1; // -1 is the code for the base field. int iIndex = 0; for ( ; ; iIndex++) { // Is this one already on my list? Converter converter = this.getConverterToPass(iIndex); if (converter == null) break; // End of list if (converter == field) return iIndex; // Found } if (field == null) return -1; // Never this.addConverterToPass(field); // Add it, and return iIndex; // Return the index to the new converter. } // Override this /**
/** * Init. * @param record The merge record. * @param iFieldSeq The sequence of the field in the target records. */ public void init(Record record, int iFieldSeq, int iSecondaryFieldSeq) { Converter converter = null; m_recMerge = record; m_iFieldSeq = iFieldSeq; m_iSecondaryFieldSeq = iSecondaryFieldSeq; if (record != null) converter = this.getTargetField(null); super.init(converter, null); if (record != null) record.addListener(new RemoveConverterOnCloseHandler(this)); // Because this is a converter (not a fieldConverter) if (m_recMerge != null) if (m_recMerge.getTable() instanceof MultiTable) { // Add all the fields in the sub-records MultiTable multiTable = (MultiTable)m_recMerge.getTable(); Iterator<BaseTable> iterator = multiTable.getTables(); while (iterator.hasNext()) { BaseTable table = (BaseTable)iterator.next(); Converter field = this.getTargetField(table.getRecord()); this.addConverterToPass(field); // Add it, and } } } /**
/** * Init. * @param record The merge record. * @param iFieldSeq The sequence of the field in the target records. */ public void init(Record record, int iFieldSeq, int iSecondaryFieldSeq) { Converter converter = null; m_recMerge = record; m_iFieldSeq = iFieldSeq; m_iSecondaryFieldSeq = iSecondaryFieldSeq; if (record != null) converter = this.getTargetField(null); super.init(converter, null); if (record != null) record.addListener(new RemoveConverterOnCloseHandler(this)); // Because this is a converter (not a fieldConverter) if (m_recMerge != null) if (m_recMerge.getTable() instanceof MultiTable) { // Add all the fields in the sub-records MultiTable multiTable = (MultiTable)m_recMerge.getTable(); Iterator<BaseTable> iterator = multiTable.getTables(); while (iterator.hasNext()) { BaseTable table = (BaseTable)iterator.next(); Converter field = this.getTargetField(table.getRecord()); this.addConverterToPass(field); // Add it, and } } } /**
this.secondaryFieldName = secondaryFieldName; if (record != null) converter = this.getTargetField(null); super.init(converter, null); if (record != null) Converter field = this.getTargetField(table.getRecord()); this.addConverterToPass(field); // Add it, and