protected Workspace workspace;
protected ContainerUnloader container;
protected AttributeModel attributeModel;
protected void flushColumns() {
Table nodeTable = attributeModel.getNodeTable();
for (ColumnDraft col : container.getNodeColumns()) {
if (!nodeTable.hasColumn(col.getId())) {
Class typeClass = col.getTypeClass();
if (col.isDynamic()) {
typeClass = AttributeUtils.getDynamicType(typeClass);
}
nodeTable.addColumn(col.getId(), col.getTitle(), typeClass, Origin.DATA, col.getDefaultValue(), true);
}
}
Table edgeTable = attributeModel.getEdgeTable();
for (ColumnDraft col : container.getEdgeColumns()) {
if (!edgeTable.hasColumn(col.getId())) {
Class typeClass = col.getTypeClass();
if (col.isDynamic()) {
typeClass = AttributeUtils.getDynamicType(typeClass);
}
edgeTable.addColumn(col.getId(), col.getTitle(), typeClass, Origin.DATA, col.getDefaultValue(), true);
}
}
}