Index Numerator. Getting Started

To use Index Numerators in application, execute the following steps:

  • Add Xafari.BC.Numerators module to the application.
  • Implement IIndexNumberSupport interface in the required business class:
  • c#
  • VB

[DefaultClassOptions]
public class Position : XafariBaseObject, IIndexNumberSupport
{
  // ...
  public int IndexNumber
  {
    get
    {
      return GetPropertyValue<int>("IndexNumber");
    }
    set
    {
      SetPropertyValue<int>("IndexNumber", value);
    }
  }
  // ...
  private Document _document;
  [Association("Document-Positions")]
  public Document Document
  {
    get
    {
      return _document;
    }
    set
    {
      SetPropertyValue("Document", ref _document, value);
    }
  }
}

<DefaultClassOptions> _
Public Class Position
  Inherits XafariBaseObject
  Implements IIndexNumberSupport
  ' ...
  Public Property IndexNumber As Integer
    Get
      Return GetPropertyValue(Of Integer)("IndexNumber")
    End Get
    Set
      SetPropertyValue(Of Integer)("IndexNumber", value)
    End Set
  End Property
  ' ...
  Private __document As Document
  <Association("Document-Positions")> _
Public Property Document As Document
    Get
      Return __document
    End Get
    Set
      SetPropertyValue("Document", __document, value)
    End Set
  End Property
End Class

  • Invoke Model Editor, navigate to business class node, set IndexNumerator parameters that shown in the image below

index_numerator_3

IndexParents property specifies the object-owner which contains a collection of numbered objects. It is possible to specify several IndexParents values, delimited by commas or semicolons:

  • example

Owner1, Owner2, Owner3 или Owner1; Owner2; Owner3

  • To implement the required use cases, examine API and Examples sections.

Complete solution is available at IndexNumber.