Table of Contents

Class SingleColumnRelationship

Inheritance
SingleColumnRelationship
Implements
Inherited Members
Namespace
TabularEditor.TOMWrapper
Assembly
TOMWrapper.dll

SingleColumnRelationship object.

public sealed class SingleColumnRelationship : Relationship, ICustomTypeDescriptor, INotifyPropertyChanging, ITabularNamedObject, INamedObject, IComparable, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, ITomErrorMessageObject, IClonableObject
Extension Methods

Properties

FromCardinality

Indicates whether the "From" end of the relationship has a cardinality of One (1) or Many (2).

public RelationshipEndCardinality FromCardinality { get; set; }

Property Value

Type Description
RelationshipEndCardinality

FromColumn

Gets or sets the starting column in a single column relationship.

[TypeConverter(typeof(ColumnConverter))]
public Column FromColumn { get; set; }

Property Value

Type Description
Column

ID

public string ID { get; }

Property Value

Type Description
string

Name

The name of this object. Warning: Changing the name can break formula logic, if Automatic Formula Fix-up is disabled.

public override string Name { get; set; }

Property Value

Type Description
string

Parent

The parent Model of the current Single Column Relationship.

public Model Parent { get; }

Property Value

Type Description
Model

ToCardinality

Indicates whether the "To" end of the relationship has a cardinality of One (1) or Many (2).

public RelationshipEndCardinality ToCardinality { get; set; }

Property Value

Type Description
RelationshipEndCardinality

ToColumn

Gets or sets the destination column in a single column relationship.

[TypeConverter(typeof(ColumnConverter))]
public Column ToColumn { get; set; }

Property Value

Type Description
Column

Methods

Clone(string)

Creates an exact copy of this SingleColumnRelationship object.

public SingleColumnRelationship Clone(string newName = null)

Parameters

Type Name Description
string newName

Returns

Type Description
SingleColumnRelationship

CreateNew(Model, string)

Creates a new SingleColumnRelationship and adds it to the parent Model. Also creates the underlying metadataobject and adds it to the TOM tree.

public static SingleColumnRelationship CreateNew(Model parent, string name = null)

Parameters

Type Name Description
Model parent
string name

Returns

Type Description
SingleColumnRelationship

GetArrow()

public string GetArrow()

Returns

Type Description
string

GetCardinalitySymbol(RelationshipEndCardinality)

public static string GetCardinalitySymbol(RelationshipEndCardinality cardinality)

Parameters

Type Name Description
RelationshipEndCardinality cardinality

Returns

Type Description
string

GetMessages()

public IEnumerable<DocumentMessage> GetMessages()

Returns

Type Description
IEnumerable<DocumentMessage>

OnPropertyChanged(string, object, object)

Fired after a property is changed

protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)

Parameters

Type Name Description
string propertyName
object oldValue
object newValue

OnPropertyChanging(string, object, ref bool, ref bool)

Called before a property is changed on an object. Derived classes can control how the change is handled. Throw ArgumentException within this method, to display an error message in the UI.

protected override void OnPropertyChanging(string propertyName, object newValue, ref bool undoable, ref bool cancel)

Parameters

Type Name Description
string propertyName

Name of the changed property.

object newValue

New value assigned to the property.

bool undoable

Return false if automatic undo of the property change is not needed.

bool cancel

Return true if the property change should not apply.

ToString()

public override string ToString()

Returns

Type Description
string