}
}
boolean required = !this.isColumnNullable(metadata, tableName, columnName);
Attribute attribute =
corePackage.getAttribute().createAttribute(
attributeName,
VisibilityKindEnum.VK_PUBLIC,
false,
ScopeKindEnum.SK_INSTANCE,
this.createAttributeMultiplicity(
corePackage.getDataTypes(),
required),
ChangeableKindEnum.CK_CHANGEABLE,
ScopeKindEnum.SK_CLASSIFIER,
OrderingKindEnum.OK_UNORDERED,
null);
attribute.setType(typeClass);
if (StringUtils.isNotEmpty(this.columnTaggedValue))
{
// add the tagged value for the column name
TaggedValue taggedValue =
this.createTaggedValue(corePackage, this.columnTaggedValue, columnName);
if (taggedValue != null)
{
attribute.getTaggedValue().add(taggedValue);
}
}
if (primaryKeyColumns.contains(columnName))
{
attribute.getStereotype().addAll(
this.getOrCreateStereotypes(corePackage, this.identifierStereotypes, "Attribute"));
}
attributes.add(attribute);
}
}