public static List < DTCellValue52 > makeDataRowList ( Object [ ] oldRow ) { List < DTCellValue52 > row = new ArrayList < DTCellValue52 > ( ) ; //Row numbers are numerical if ( oldRow [ 0 ] instanceof String ) { DTCellValue52 rowDcv = new DTCellValue52 ( new Integer ( ( String ) oldRow [ 0 ] ) ) ; row . add ( rowDcv ) ; } else if ( oldRow [ 0 ] instanceof Number ) { DTCellValue52 rowDcv = new DTCellValue52 ( ( ( Number ) oldRow [ 0 ] ) . intValue ( ) ) ; row . add ( rowDcv ) ; } else { DTCellValue52 rowDcv = new DTCellValue52 ( oldRow [ 0 ] ) ; row . add ( rowDcv ) ; } for ( int iCol = 1 ; iCol < oldRow . length ; iCol ++ ) { //The original model was purely String based. Conversion to typed fields //occurs when the Model is re-saved in Guvnor. Ideally the conversion //should occur here but that requires reference to a SuggestionCompletionEngine //which requires RepositoryServices. I did not want to make a dependency between //common IDE classes and the Repository DTCellValue52 dcv = new DTCellValue52 ( oldRow [ iCol ] ) ; row . add ( dcv ) ; } return row ; }
Convert a single dimension array of Strings to a List with type - safe entries . The first entry is converted into a numerical row number