@Test @DisplayName("extract simple Protobuf field based columns") void extractSimpleColumns() { EntityClass<TaskListViewProjection> entityClass = asEntityClass(TaskListViewProjection.class); Scanner scanner = new Scanner(entityClass); ImmutableMap<ColumnName, SimpleColumn> columns = scanner.simpleColumns(); assertThat(columns).containsKey(ColumnName.of("description")); }
ImmutableMap<ColumnName, SimpleColumn> simpleColumns() { if (columnsInterfaceBased) { return ImmutableMap.of(); } ImmutableMap.Builder<ColumnName, SimpleColumn> columns = ImmutableMap.builder(); for (FieldDeclaration field : columnsOf(entityClass.stateType())) { addSimpleColumn(field, columns); } return columns.build(); }
Scanner { ImmutableMap<ColumnName, SimpleColumn> simpleColumns() { if (columnsInterfaceBased) { return ImmutableMap.of(); } ImmutableMap.Builder<ColumnName, SimpleColumn> columns = ImmutableMap.builder(); for (FieldDeclaration field : columnsOf(entityClass.stateType())) { addSimpleColumn(field, columns); } return columns.build(); } }
Scanner { ImmutableMap<ColumnName, SimpleColumn> simpleColumns() { if (columnsInterfaceBased) { return ImmutableMap.of(); } ImmutableMap.Builder<ColumnName, SimpleColumn> columns = ImmutableMap.builder(); for (FieldDeclaration field : columnsOf(entityClass.stateType())) { addSimpleColumn(field, columns); } return columns.build(); } Scanner(EntityClass<?> entityClass); }
Scanner { ImmutableMap<ColumnName, SimpleColumn> simpleColumns() { if (columnsInterfaceBased) { return ImmutableMap.of(); } ImmutableMap.Builder<ColumnName, SimpleColumn> columns = ImmutableMap.builder(); for (FieldDeclaration field : columnsOf(entityClass.stateType())) { addSimpleColumn(field, columns); } return columns.build(); } Scanner(EntityClass<?> entityClass);  }
Scanner { ImmutableMap<ColumnName, SimpleColumn> simpleColumns() { if (columnsInterfaceBased) { return ImmutableMap.of(); } ImmutableMap.Builder<ColumnName, SimpleColumn> columns = ImmutableMap.builder(); for (FieldDeclaration field : columnsOf(entityClass.stateType())) { addSimpleColumn(field, columns); } return columns.build(); } Scanner(EntityClass<?> entityClass);   }