package gw.rating.rtm.domain.table uses gw.rating.rtm.domain.PersistenceAdapter uses gw.rating.rtm.valueprovider.RateTableCellValueProvider uses gw.rating.rtm.valueprovider.RateTableCellValueProviderFactory uses java.util.Set class ValueProviderCell extends RateTableCell { protected var _valueProvider : RateTableCellValueProvider as readonly ValueProvider protected construct(column : RateTableColumn, adapter : PersistenceAdapter) { super(column, adapter) _valueProvider = RateTableCellValueProviderFactory.getValueProvider(column) } override property get ExportValue() : String { return _valueProvider.convertPublicIDToCodeIdentifier(_cellValue) } override function extractValueFromExcelString(s: String) : String { return _valueProvider.convertCodeIdentifierToPublicID(s) } override function cellValueContainsCode(codes : Set) : boolean { return codes.contains(this.Value) } /* * We are using code identifiers to sort the value provider cells instead * of the cell value which is public ID */ override function compareTo(other : RateTableCell) : int { var codeIdentifier = this.ExportValue ?: "" var otherCodeIdentifier = other.ExportValue ?: "" return compareParsedValues(codeIdentifier, otherCodeIdentifier) } }