String label) {
String alias = getCurrentAlias();
if (skipSet.add(new ColumnTracker(alias, attribute))) {
ColumnDescriptor column = (objAttribute != null) ? new ColumnDescriptor(
objAttribute,
attribute,
alias) : new ColumnDescriptor(attribute, alias);
if (label != null) {
column.setDataRowKey(label);
}
columns.add(column);
// TODO: andrus, 5/7/2006 - replace 'columns' collection with this map, as it
// is redundant
defaultAttributesByColumn.put(column, objAttribute);
}
else if (objAttribute != null) {
// record ObjAttribute override
for (ColumnDescriptor column : columns) {
if (attribute.getName().equals(column.getName())) {
// kick out the original attribute
ObjAttribute original = defaultAttributesByColumn.remove(column);
if (original != null) {
if (attributeOverrides == null) {
attributeOverrides = new HashMap<ObjAttribute, ColumnDescriptor>();
}
attributeOverrides.put(original, column);
column.setJavaClass(Void.TYPE.getName());
}
break;
}
}