}
deleteColumn( origColumnIndex,
true );
//Log change to column definition
model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
origColumn,
editColumn ) );
} else {
// Update column's visibility
if ( origColumn.isHideColumn() != editColumn.isHideColumn() ) {
setColumnVisibility( origColumn,
!editColumn.isHideColumn() );
}
// Change in operator
if ( !isEqualOrNull( origColumn.getOperator(),
editColumn.getOperator() ) ) {
bUpdateColumnDefinition = true;
//Clear otherwise if column cannot accept them
if ( !canAcceptOtherwiseValues( editColumn ) ) {
removeOtherwiseStates( origColumn );
bUpdateColumnData = true;
}
}
// Update column's Cell type. Other than the obvious change in data-type if the
// Operator changes to or from "not set" (possible for literal columns and formulae)
// the column needs to be changed to or from Text.
if ( !isEqualOrNull( origPattern.getFactType(),
editPattern.getFactType() )
|| !isEqualOrNull( origColumn.getFactField(),
editColumn.getFactField() )
|| !isEqualOrNull( origColumn.getFieldType(),
editColumn.getFieldType() )
|| !isEqualOrNull( origColumn.getOperator(),
editColumn.getOperator() )
|| origColumn.getConstraintValueType() != editColumn.getConstraintValueType() ) {
bUpdateColumnData = true;
bUpdateColumnDefinition = true;
}
// Update column's cell content if the Optional Value list has changed
if ( !isEqualOrNull( origColumn.getValueList(),
editColumn.getValueList() ) ) {
bUpdateColumnDefinition = true;
bUpdateColumnData = updateCellsForOptionValueList( editColumn,
origColumn );
}
// Update column header in Header Widget
if ( !origColumn.getHeader().equals( editColumn.getHeader() ) ) {
bUpdateColumnDefinition = true;
}
// Update column binding in Header Widget
if ( !origColumn.isBound() && editColumn.isBound() ) {
bUpdateColumnDefinition = true;
} else if ( origColumn.isBound() && !editColumn.isBound() ) {
bUpdateColumnDefinition = true;
} else if ( origColumn.isBound() && editColumn.isBound() && !origColumn.getBinding().equals( editColumn.getBinding() ) ) {
bUpdateColumnDefinition = true;
}
// Update LimitedEntryValue in Header Widget
if ( origColumn instanceof LimitedEntryCol && editColumn instanceof LimitedEntryCol ) {
LimitedEntryCol lecOrig = (LimitedEntryCol) origColumn;
LimitedEntryCol lecEditing = (LimitedEntryCol) editColumn;
if ( !isEqualOrNull( lecOrig.getValue(),
lecEditing.getValue() ) ) {
bUpdateColumnDefinition = true;
}
}
//Log change to column definition
if ( bUpdateColumnDefinition ) {
model.getAuditLog().add( new UpdateColumnAuditLogEntry( identity.getName(),
origColumn,
editColumn ) );
}
// Copy new values into original column definition