提交 cc3c4967 编写于 作者: S serge-rider

ERD attributes filter

上级 346f87ea
......@@ -177,13 +177,7 @@ public class ERDDecoratorDefault implements ERDDecorator {
entity.getDataSource().getContainer().getObjectFilter(firstAttr.getClass(), entity, false);
if (!CommonUtils.isEmpty(attributes)) {
for (DBSEntityAttribute attribute : attributes) {
if (attribute instanceof DBSEntityAssociation) {
// skip attributes which are associations
// usual thing in some systems like WMI/CIM model
continue;
}
if (DBUtils.isHiddenObject(attribute) || DBUtils.isInheritedObject(attribute)) {
// Skip hidden attributes
if (!isAttributeVisible(erdEntity, attribute)) {
continue;
}
if (columnFilter != null && !columnFilter.matches(attribute.getName())) {
......@@ -216,6 +210,19 @@ public class ERDDecoratorDefault implements ERDDecorator {
}
}
protected boolean isAttributeVisible(ERDEntity erdEntity, DBSEntityAttribute attribute) {
if (attribute instanceof DBSEntityAssociation) {
// skip attributes which are associations
// usual thing in some systems like WMI/CIM model
return false;
}
if (DBUtils.isHiddenObject(attribute) || DBUtils.isInheritedObject(attribute)) {
// Skip hidden attributes
return false;
}
return true;
}
@Override
public ERDAssociation createAutoAssociation(ERDContainer diagram, DBSEntityAssociation association, ERDEntity sourceEntity, ERDEntity targetEntity, boolean reflect) {
// Allow all auto-associations
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册