#11426 Allow editing column's computed definition and persistence state

上级 c3c9977e
......@@ -255,16 +255,24 @@ public class SQLServerTableColumn extends JDBCTableColumn<SQLServerTableBase> im
this.collationName = collationName;
}
@Property(viewable = true, order = 76, visibleIf = IsColumnComputedValidator.class)
@Property(editable = true, order = 76)
public String getComputedDefinition() {
return computedDefinition;
}
@Property(viewable = true, order = 77, visibleIf = IsColumnComputedValidator.class)
public void setComputedDefinition(String computedDefinition) {
this.computedDefinition = computedDefinition;
}
@Property(editable = true, order = 77)
public boolean isComputedPersisted() {
return computedPersisted;
}
public void setComputedPersisted(boolean computedPersisted) {
this.computedPersisted = computedPersisted;
}
@Property(viewable = false, order = 80)
@Override
public boolean isHidden() {
......@@ -356,11 +364,4 @@ public class SQLServerTableColumn extends JDBCTableColumn<SQLServerTableBase> im
return allTypes.toArray();
}
}
public static class IsColumnComputedValidator implements IPropertyValueValidator<SQLServerTableColumn, Object> {
@Override
public boolean isValidValue(SQLServerTableColumn object, Object value) {
return CommonUtils.isNotEmpty(object.getComputedDefinition());
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册