Beispiel #1
0
        public static Column ToColumn(PlainBufferCell cell)
        {
            if (!cell.HasCellName() || !cell.HasCellValue())
            {
                throw new IOException("The cell has no name or value: " + cell);
            }

            if (cell.HasCellType() && cell.GetCellType() != PlainBufferConsts.INCREMENT)
            {
                throw new IOException("The cell should not has type: " + cell);
            }

            if (cell.HasCellTimestamp())
            {
                return(new Column(cell.GetCellName(), cell.GetCellValue(), cell.GetCellTimestamp()));
            }
            else
            {
                return(new Column(cell.GetCellName(), cell.GetCellValue()));
            }
        }