BusinessObjectType

data class BusinessObjectType(val name: String, val stateMachine: StateMachine? = null, val attributes: Set<Attribute> = emptySet())

Represents a BusinessObjectType in the Merode Model.

Parameters

name

The name of the BusinessObjectType.

stateMachine

The StateMachine defining the behavior of the BusinessObjectType instances (BusinessObjects).

attributes

The user-defined Attributes of the BusinessObjectType, representing its data structure

Constructors

Link copied to clipboard
constructor(name: String, attributes: Set<Attribute> = emptySet())

Creates a new BusinessObjectType with the provided name and attributes (empty by default). The created BusinessObjectType will not have a StateMachine. It must be set using the stateMachine method.

constructor(name: String, stateMachine: StateMachine? = null, attributes: Set<Attribute> = emptySet())

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
operator fun invoke(): EitherNel<InstanceError, BusinessObject>

This method enables the creation of instances of this BusinessObjectType. It should be used to create new BusinessObjects of this BusinessObjectType to which no Event has been applied yet.

operator fun invoke(id: Long, state: State = State.Initial, props: Map<String, Any?> = emptyMap()): EitherNel<InstanceError, BusinessObject>
operator fun invoke(id: Long, state: State, masters: Map<String, BusinessObject>, vararg propsValues: Any?): EitherNel<InstanceError, BusinessObject>
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String