Search Results for

    Show / Hide Table of Contents

    Class RelationBase

    Base class for relations (with storage) and virtual relations (with conditions).

    Inheritance
    System.Object
    DynamicObject
    NamedDynamicObject
    ModelElement
    RelationBase
    LogicalRelation
    Relation
    Implements
    System.Dynamic.IDynamicMetaObjectProvider
    System.ComponentModel.INotifyPropertyChanged
    System.ComponentModel.IDataErrorInfo
    INullable
    Inherited Members
    ModelElement.IsValidIdentifier(String)
    ModelElement.OnDeserializing(StreamingContext)
    ModelElement.Accept(ModelElementVisitor)
    ModelElement.Detach()
    ModelElement.Validate(IList<PropertyValidationMessage>, Boolean)
    ModelElement.SetOwnershipPrefix(String)
    ModelElement.UpdateChildren(NotifyCollectionChangedEventArgs)
    ModelElement.SetPersistBehavior(PersistBehavior)
    ModelElement.SetName(String)
    ModelElement.SetOwnership(Ownership)
    ModelElement.ElementGuid
    ModelElement.Name
    ModelElement.Parent
    ModelElement.Children
    ModelElement.PersistBehavior
    ModelElement.IsFullPersistBehavior
    ModelElement.IsNonePersistBehavior
    ModelElement.IsSystemElement
    ModelElement.IsApplicationSpecificElement
    ModelElement.IsUserElement
    ModelElement.IsSystemOrApplicationSpecificElement
    ModelElement.InvariantFriendlyName
    ModelElement.CreationVersion
    ModelElement.LastUpdateVersion
    ModelElement.Error
    ModelElement.ErrorSummary
    ModelElement.IsValid
    ModelElement.Ownership
    ModelElement.OwnershipPrefix
    ModelElement.NonPrefixedName
    NamedDynamicObject.OnPropertyChanged(String)
    NamedDynamicObject.PropertyChanged
    DynamicObject.GetMember(String)
    DynamicObject.SetMember(String, Object)
    DynamicObject.GetMetaObject(Expression)
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.DataModel
    Assembly: TimeCockpit.Data.dll
    Syntax
    public abstract class RelationBase : ModelElement, IDynamicMetaObjectProvider, INotifyPropertyChanged, IDataErrorInfo, INullable

    Constructors

    RelationBase()

    Initializes a new instance of the RelationBase class.

    Declaration
    public RelationBase()

    RelationBase(IEnumerable<KeyValuePair<Object, Object>>)

    Initializes a new instance of the RelationBase class.

    Declaration
    public RelationBase(IEnumerable<KeyValuePair<object, object>> properties)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.Object, System.Object>> properties

    Collection of properties.

    Remarks

    You can use this constructor to initialize a new instance of the RelationBase class by specifying its properties in a list of key/value pairs. This is especially useful for dynamic languages like python.

    RelationBase(RelationBase)

    Initializes a new instance of the RelationBase class.

    Declaration
    public RelationBase(RelationBase element)
    Parameters
    Type Name Description
    RelationBase element

    The relation to copy.

    Remarks

    This copy constructor creates copies of all value-typed properties. StorageColumns and Permissions from element are just added to the corresponding collections of the new Relation. No copying is performed.

    Properties

    DataType

    Gets the type of the relation.

    Declaration
    public Type DataType { get; }
    Property Value
    Type Description
    System.Type

    IsNullable

    Gets or sets a value indicating whether either Relation or ModelProperty can be null or not.

    Declaration
    public abstract bool IsNullable { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if a Relation or ModelProperty can be null; otherwise, false.

    Implements
    INullable.IsNullable

    Permissions

    Gets the deny read write permissions of the ModelProperty.

    Declaration
    public ModelCollection<Permission> Permissions { get; }
    Property Value
    Type Description
    ModelCollection<Permission>

    Target

    Gets or sets the target of the relation.

    Declaration
    public abstract ModelEntityBase Target { get; set; }
    Property Value
    Type Description
    ModelEntityBase

    Methods

    Attach(ModelElement)

    Attaches a model element to a parent model element.

    Declaration
    protected override void Attach(ModelElement newParent)
    Parameters
    Type Name Description
    ModelElement newParent

    Parent model element.

    Overrides
    ModelElement.Attach(ModelElement)
    Remarks

    Note to implementers: If your model element has sub-elements, your implementation of Attach should call the base class' implementation and afterwards attach all sub-elements.

    Exceptions
    Type Condition
    System.ArgumentNullException

    newParent is null.

    System.ArgumentException

    Thrown in case of a recursion in the model element tree.

    InitializeObject()

    Initializes the RelationBase object setting fields of the object to their default values.

    Declaration
    protected virtual void InitializeObject()

    RemovePermissions()

    Empty the Permissions and EnabledPermissions.

    Declaration
    protected void RemovePermissions()

    ShallowCopy()

    Performs a shallow copy of the current RelationBase/the derived class.

    Declaration
    public abstract RelationBase ShallowCopy()
    Returns
    Type Description
    RelationBase

    A shallow copy of the current RelationBase.

    ShallowCopy(String, PersistBehavior, Ownership, Boolean, Boolean)

    Performs a shallow copy of the current RelationBase/the derived class.

    Declaration
    public abstract RelationBase ShallowCopy(string name, PersistBehavior persistBehavior, Ownership ownership, bool ignorePermissions = false, bool ignoreDefaultValues = false)
    Parameters
    Type Name Description
    System.String name

    Overridden model element name.

    PersistBehavior persistBehavior

    Overridden persist behavior.

    Ownership ownership

    Overridden ownership.

    System.Boolean ignorePermissions

    if set to true [ignore permissions].

    System.Boolean ignoreDefaultValues

    if set to true [ignore default values].

    Returns
    Type Description
    RelationBase

    A shallow copy of the current RelationBase.

    In This Article
    Back to top Copyright © 2020 software architects gmbh