1. RelationBase

Class RelationBase

Version:
日本語翻訳に関する免責事項

このページの翻訳はAIによって自動的に行われました。可能な限り正確な翻訳を心掛けていますが、原文と異なる表現や解釈が含まれる場合があります。正確で公式な情報については、必ず英語の原文をご参照ください。

Base class for relations.

Inheritance
System.Object
RelationBase
Namespace: Stylelabs.M.Sdk.Models.Base
Assembly: Stylelabs.M.Sdk.dll
Syntax
public abstract class RelationBase : MemberBase, IRelation, IMember, IDirtyTracking

Constructors

RelationBase(String)

Declaration
protected RelationBase(string name)
Parameters
TypeNameDescription
System.Stringname

Properties

DefinitionType

Declaration
public override MemberDefinitionType DefinitionType { get; }
Property Value
TypeDescription
MemberDefinitionType
Overrides

Role

The role of this instance in the relation.

Declaration
public abstract RelationRole Role { get; }
Property Value
TypeDescription
RelationRole

Methods

Clear()

Clears the value(s) of the relation.

Declaration
public abstract void Clear()

GetIds()

This utility method allows getting the value of any type of relation.

In case of an IToManyRelation the result will contain all ids on the relation.

In case of an IToOneRelation the list can contain 1 id (maximum) if an id was set on the relation. If no id was set on the relation, an empty list is returned.

Declaration
public abstract IList<long> GetIds()
Returns
TypeDescription
IList<System.Int64>

A list of ids (never null).

GetTypeName()

Declaration
protected abstract string GetTypeName()
Returns
TypeDescription
System.String

SetIds(IEnumerable<Int64>)

Sets the ids on the relations values. The values should be strictly positive.

In case of an IToManyRelation, the list of ids will be set on the relation.

In case of an IToOneRelation, ids can have at most one value. If the list is empty then the value will be set to null.

Declaration
public abstract void SetIds(IEnumerable<long> ids)
Parameters
TypeNameDescription
IEnumerable<System.Int64>ids

Ids

Implements

この記事を改善するための提案がある場合は、 お知らせください!