Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DorfDomainObject

Base class which may define Domain Object. Enfoces the existence of field definitions. To act with DORF it is needed to either extend this class to or use @DorfObject() and the related annotations.

example

 //
 class Person extends DorfDomainObject {

   constructor(private name: string, private surname: string) {
     super();
   }

   // @Override
   get fieldDefinitions(): PropertiesToDorfDefinitionsMap<Person> {
     return {
       "name": this.nameDef,
       "surname": this.surnameDef
     };
   }

   private get nameDef(): DorfInputDefinition<string> {
     return new DorfInputDefinition({
       label: "Name",
       type: "text"
     });
   }

   private get surnameDef(): DorfInputDefinition<string> {
     return new DorfInputDefinition({
       label: "Surname",
       type: "text"
     });
   }
 }
stable

Hierarchy

  • DorfDomainObject

Index

Properties

Accessors

Methods

Properties

fieldDefinitions

Object property requires its definition here, to be presented in DORF form. Stores key-value pairs, where key is the property name on Object.

example

 //
 get fieldDefinitions(): PropertiesToDorfDefinitionsMap<Person> {
    return {
       "name": new DorfInputDefinition({
          label: "Name",
          type: "text"
       }),
       "surname": new DorfInputDefinition({
          label: "Surname",
          type: "text"
       }),
    };
 }

Accessors

isDorfObject

  • get isDorfObject(): boolean

Methods

updateDefinition

Generated using TypeDoc