Source:
protected Column(Table table, String fieldName, EntityDictionary dictionary) { this.table = table; Class<?> tableClass = dictionary.getEntityClass(table.getName(), table.getVersion()); this.id = constructColumnName(tableClass, fieldName, dictionary); this.name = fieldName; ColumnMeta meta = dictionary.getAttributeOrRelationAnnotation(tableClass, ColumnMeta.class, fieldName); if (meta != null) { this.description = meta.description(); this.category = meta.category(); this.values = new HashSet<>(Arrays.asList(meta.values())); this.tags = new HashSet<>(Arrays.asList(meta.tags())); this.cardinality = (meta.size().equals(CardinalitySize.UNKNOWN)) ? null : meta.size(); } else { this.description = null; this.category = null; this.values = null; this.tags = new HashSet<>(); this.cardinality = null; } if (dictionary.attributeOrRelationAnnotationExists(tableClass, fieldName, MetricFormula.class)) { columnType = FORMULA; expression = dictionary .getAttributeOrRelationAnnotation(tableClass, MetricFormula.class, fieldName).value(); } else if (dictionary.attributeOrRelationAnnotationExists(tableClass, fieldName, DimensionFormula.class)) { columnType = FORMULA; expression = dictionary .getAttributeOrRelationAnnotation(tableClass, DimensionFormula.class, fieldName).value(); } else { columnType = FIELD; expression = dictionary.getAnnotatedColumnName(tableClass, fieldName); } this.tableSource = getTableSource(meta, this); this.valueType = getValueType(tableClass, fieldName, dictionary); this.valueSourceType = getValueSourceType(); if (valueType == null) { throw new IllegalArgumentException("Unknown data type for " + this.id); } }

Target:
protected Column(Table table, String fieldName, EntityDictionary dictionary) { this.table = table; Class<?> tableClass = dictionary.getEntityClass(table.getName(), table.getVersion()); this.id = constructColumnName(tableClass, fieldName, dictionary); this.name = fieldName; ColumnMeta meta = dictionary.getAttributeOrRelationAnnotation(tableClass, ColumnMeta.class, fieldName); if (meta != null) { this.description = meta.description(); this.category = meta.category(); this.values = new HashSet<>(Arrays.asList(meta.values())); this.tags = new HashSet<>(Arrays.asList(meta.tags())); this.tableSource = (meta.tableSource().trim().isEmpty()) ? null : meta.tableSource(); this.valueSourceType = getValueSourceType(); this.cardinality = meta.size(); } else { this.description = null; this.category = null; this.values = null; this.tags = new HashSet<>(); this.tableSource = null; this.valueSourceType = ValueSourceType.NONE; this.cardinality = CardinalitySize.UNKNOWN; } if (dictionary.attributeOrRelationAnnotationExists(tableClass, fieldName, MetricFormula.class)) { columnType = FORMULA; expression = dictionary .getAttributeOrRelationAnnotation(tableClass, MetricFormula.class, fieldName).value(); } else if (dictionary.attributeOrRelationAnnotationExists(tableClass, fieldName, DimensionFormula.class)) { columnType = FORMULA; expression = dictionary .getAttributeOrRelationAnnotation(tableClass, DimensionFormula.class, fieldName).value(); } else { columnType = FIELD; expression = dictionary.getAnnotatedColumnName(tableClass, fieldName); } this.valueType = getValueType(tableClass, fieldName, dictionary); if (valueType == null) { throw new IllegalArgumentException("Unknown data type for " + this.id); } }