public override void save()
{
//create the _wrapped attribute if needed
if (_wrappedattribute == null)
{
if (this._ownerTable._wrappedClass == null)
{
this.ownerTable.save();
}
//now the wrappedClass should exist. if not then we have a problem
this._wrappedattribute = this.factory.modelFactory.createNewElement<TSF_EA.Attribute>(this._ownerTable._wrappedClass,this.name);
}
if (_wrappedattribute != null)
{
//set steretotype
this._wrappedattribute.setStereotype("column");
//set datatype;
_wrappedattribute.type = this.factory.modelFactory.createPrimitiveType(this.type.name);
if (this.type.type.hasPrecision)
{
_wrappedattribute.precision = this.type.length;
_wrappedattribute.scale = this.type.precision;
}
else
{
_wrappedattribute.length = this.type.length;
}
//is not nullable
this.isNotNullable = _isNotNullable;
//set position
_wrappedattribute.position = _position;
//save
_wrappedattribute.save();
//set isOverridden
this.isOverridden = this.isOverridden;
//set renamed
this.isRenamed = this.isRenamed;
//logical attribute tag value
if (traceTaggedValue == null) createTraceTaggedValue();
}
//save the columnn name in the alias
if (logicalAttribute != null) logicalAttribute.save();
}