@Test @DisplayName("extract system columns from the entity class") void extractSystemColumns() { EntityClass<TaskViewProjection> entityClass = asEntityClass(TaskViewProjection.class); Scanner scanner = new Scanner(entityClass); ImmutableMap<ColumnName, SysColumn> systemColumns = scanner.systemColumns(); assertThat(systemColumns).containsKey(ColumnName.of(archived)); assertThat(systemColumns).containsKey(ColumnName.of(deleted)); assertThat(systemColumns).containsKey(ColumnName.of(version)); }
ImmutableMap<ColumnName, SysColumn> systemColumns() { ImmutableMap.Builder<ColumnName, SysColumn> columns = ImmutableMap.builder(); Class<?> entityClazz = entityClass.value(); addSystemColumns(entityClazz, columns); return columns.build(); }
Scanner { ImmutableMap<ColumnName, SysColumn> systemColumns() { ImmutableMap.Builder<ColumnName, SysColumn> columns = ImmutableMap.builder(); Class<?> entityClazz = entityClass.value(); addSystemColumns(entityClazz, columns); return columns.build(); } }
Scanner { ImmutableMap<ColumnName, SysColumn> systemColumns() { ImmutableMap.Builder<ColumnName, SysColumn> columns = ImmutableMap.builder(); Class<?> entityClazz = entityClass.value(); addSystemColumns(entityClazz, columns); return columns.build(); } Scanner(EntityClass<?> entityClass); }
Scanner { ImmutableMap<ColumnName, SysColumn> systemColumns() { ImmutableMap.Builder<ColumnName, SysColumn> columns = ImmutableMap.builder(); Class<?> entityClazz = entityClass.value(); addSystemColumns(entityClazz, columns); return columns.build(); } Scanner(EntityClass<?> entityClass);  }
Scanner { ImmutableMap<ColumnName, SysColumn> systemColumns() { ImmutableMap.Builder<ColumnName, SysColumn> columns = ImmutableMap.builder(); Class<?> entityClazz = entityClass.value(); addSystemColumns(entityClazz, columns); return columns.build(); } Scanner(EntityClass<?> entityClass);   }