}
}
public static <T> Object getDynamicColumn(Row row, Serializer<T> serializer, int columnIndex, ColumnFamily<?,?> cf) {
ComparatorType comparatorType = serializer.getComparatorType();
switch(comparatorType) {
case ASCIITYPE:
return row.getString(columnIndex);
case BYTESTYPE:
return row.getBytes(columnIndex);
case INTEGERTYPE:
return row.getInt(columnIndex);
case INT32TYPE:
return row.getInt(columnIndex);
case DECIMALTYPE:
return row.getFloat(columnIndex);
case LEXICALUUIDTYPE:
return row.getUUID(columnIndex);
case LOCALBYPARTITIONERTYPE:
return row.getBytes(columnIndex);
case LONGTYPE:
return row.getLong(columnIndex);
case TIMEUUIDTYPE:
return row.getUUID(columnIndex);
case UTF8TYPE:
return row.getString(columnIndex);
case COMPOSITETYPE:
return getCompositeColumn(row, (AnnotatedCompositeSerializer<?>) serializer, cf);
case DYNAMICCOMPOSITETYPE:
throw new NotImplementedException();
case UUIDTYPE:
return row.getUUID(columnIndex);
case COUNTERTYPE:
return row.getLong(columnIndex);
case DOUBLETYPE:
return row.getDouble(columnIndex);
case FLOATTYPE:
return row.getFloat(columnIndex);
case BOOLEANTYPE:
return row.getBool(columnIndex);
case DATETYPE:
return row.getDate(columnIndex);
default:
throw new RuntimeException("Could not recognize comparator type: " + comparatorType.getTypeName());
}
}