Skip to content
logoBack to home screen

Root Model

The root-model is the basis for every other model in tribefire.

General

The root-model is the minimal dependency for all models in tribefire.

It provides the type GenericEntity, which acts as a marker telling tribefire that an element is to be treated as an entity type.

Structure

Below you can find an overview of the root-model's structure, depicting its elements.

Elements

TypeAbstractPurposePropertiesOverrides
GenericEntitytrueInstance of EntityType.
Super type for all entity types in
tribefire. Provides the id-property
as object.
id: object

globalId: string

partition: string
StandardIdentifiable
extends:
GenericEntity
trueProvides the id-property as long.propertyOverrides:id

declaringTypeInfo:
StandardIdentifiable

metaData:TypeSpecification

type:
long
StandardIntegerIdentifiable
extends:
GenericEntity
trueProvides the id-property as integer.propertyOverrides:id

declaringTypeInfo:
StandardIntegerIdentifiable

metaData:TypeSpecification

type:
integer
StandardStringIdentifiable
extends:
GenericEntity
trueProvides the id-property as string.propertyOverrides:id

declaringTypeInfo:
StandardIntegerIdentifiable

metaData:TypeSpecification

type:
string
objectfalseInstance of GmBaseType, represents the object type
stringfalseInstance of GmStringType, represents the simple string type
booleanfalseInstance of GmBooleanType, represents the simple boolean type
integerfalseInstance of GmIntegerType, represents the simple integer type
longfalseInstance of GmLongType, represents the simple long type
doublefalseInstance of GmDoubleType, represents the simple double type
decimalfalseInstance of GmDecimalType, represents the simple decimal type
floatfalseInstance of GmFloatType, represents the simple float type
datefalseInstance of GmDateType, represents the simple date type

For information about overrides, see Metamodel.

GenericEntity

GenericEntity is a special entity type in tribefire. It is on the top of the inheritance hierarchy of any entity type. That means, except itself, every other type has at least the GenericEntity as a supertype.

This is also true for the GmEntityType although it is at the same time an instance of it. This is a consequence of the fact that the meta-model is able to describe itself and one of the major cortex paradigms.

If you create a model via the graphical modeler the GenericEntity is added as the supertype for your entity types automatically. When you define your entity types via interfaces, then you have to add it (or a type deriving from it) as a supertype by yourself.

As described in the table it inherits its id-property to its sub-types. That means, whithout further configuration the id's type is Object and it's up to the access to specify its actual type. In case you're required to restrict its type to long, integer or string you can do this either with the metadata TypeSpecification or by using one of the three StandardIdentifable-types.

StandardIdentifiables

The three standard identifable types StandardIdentifiable, StandardIntegerIdentifiable and StandardStringIdentifiable are convenience types, which allow you to restrict the entity type's id-property to long, integer or string.

Simple Types

Simple properties with primitive types are defined via Object (the most common base type) or simple types like string, data, boolean, integer, etc. The root model instantiates the respective entity types to provided them already (e.g. selected in the graphical modeler).