@Test public void testModelRowWithOneCell() { FlatRow.Cell cell = new FlatRow.Cell("family", toByteString("column"), 500, toByteString("value"), null); FlatRow flatRow = FlatRow.newBuilder().withRowKey(toByteString("key")).addCell(cell).build(); com.google.cloud.bigtable.data.v2.models.Row expectedRow = com.google.cloud.bigtable.data.v2.models.Row.create( flatRow.getRowKey(), Arrays.asList( RowCell.create( cell.getFamily(), cell.getQualifier(), cell.getTimestamp(), cell.getLabels(), cell.getValue()))); Assert.assertEquals(expectedRow, FlatRowConverter.convertToModelRow(flatRow)); }
public static com.google.cloud.bigtable.data.v2.models.Row convertToModelRow(FlatRow row) { if (row == null || row.getCells() == null) { return null; } ImmutableList.Builder<RowCell> rowCellList = ImmutableList.builderWithExpectedSize(row.getCells().size()); for (FlatRow.Cell cell : row.getCells()) { rowCellList.add(toRowCell(cell)); } return com.google.cloud.bigtable.data.v2.models.Row.create( row.getRowKey(), rowCellList.build()); }
FlatRowConverter { public static com.google.cloud.bigtable.data.v2.models.Row convertToModelRow(FlatRow row) { if (row == null || row.getCells() == null) { return null; } ImmutableList.Builder<RowCell> rowCellList = ImmutableList.builderWithExpectedSize(row.getCells().size()); for (FlatRow.Cell cell : row.getCells()) { rowCellList.add(toRowCell(cell)); } return com.google.cloud.bigtable.data.v2.models.Row.create( row.getRowKey(), rowCellList.build()); } }
FlatRowConverter { public static com.google.cloud.bigtable.data.v2.models.Row convertToModelRow(FlatRow row) { if (row == null || row.getCells() == null) { return null; } ImmutableList.Builder<RowCell> rowCellList = ImmutableList.builderWithExpectedSize(row.getCells().size()); for (FlatRow.Cell cell : row.getCells()) { rowCellList.add(toRowCell(cell)); } return com.google.cloud.bigtable.data.v2.models.Row.create( row.getRowKey(), rowCellList.build()); }  }
FlatRowConverter { public static com.google.cloud.bigtable.data.v2.models.Row convertToModelRow(FlatRow row) { if (row == null || row.getCells() == null) { return null; } ImmutableList.Builder<RowCell> rowCellList = ImmutableList.builderWithExpectedSize(row.getCells().size()); for (FlatRow.Cell cell : row.getCells()) { rowCellList.add(toRowCell(cell)); } return com.google.cloud.bigtable.data.v2.models.Row.create( row.getRowKey(), rowCellList.build()); }  static Row convert(FlatRow row); static com.google.cloud.bigtable.data.v2.models.Row convertToModelRow(FlatRow row); }
FlatRowConverter { public static com.google.cloud.bigtable.data.v2.models.Row convertToModelRow(FlatRow row) { if (row == null || row.getCells() == null) { return null; } ImmutableList.Builder<RowCell> rowCellList = ImmutableList.builderWithExpectedSize(row.getCells().size()); for (FlatRow.Cell cell : row.getCells()) { rowCellList.add(toRowCell(cell)); } return com.google.cloud.bigtable.data.v2.models.Row.create( row.getRowKey(), rowCellList.build()); }  static Row convert(FlatRow row); static com.google.cloud.bigtable.data.v2.models.Row convertToModelRow(FlatRow row);  }