modelFieldAttributes = HashMultimap.create();
+ for (FieldMapping field : this.getFields()) {
+ if (!field.isFieldMapping()) {
+ modelFieldAttributes.putAll(field.getModelFieldName(), field.getAttributes());
+ }
+ }
+
for (FieldMapping f : this.getFields()) {
- builder.append("").append(f.getColumnVisibility()).append(" | ");
- builder.append("").append(f.getFieldName()).append(" | ");
- builder.append("").append(f.getDatatype()).append(" | ");
- builder.append("").append(f.getModelFieldName()).append(" | ");
- builder.append("").append(f.getDirection()).append(" | ");
- builder.append("");
+ // don't include model field attributes
+ if (f.isFieldMapping()) {
+ builder.append("").append(f.getColumnVisibility()).append(" | ");
+ builder.append("").append(f.getFieldName()).append(" | ");
+ builder.append("").append(f.getDatatype()).append(" | ");
+ builder.append("").append(f.getModelFieldName()).append(" | ");
+ builder.append("").append(f.getDirection()).append(" | ");
+ TreeSet attributes = new TreeSet<>(f.getAttributes());
+ if (modelFieldAttributes.containsKey(f.getModelFieldName())) {
+ attributes.addAll(modelFieldAttributes.get(f.getModelFieldName()));
+ }
+ builder.append("").append(attributes).append(" | ");
+ builder.append("");
+ }
}
builder.append("