Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ComplexType

Container for all of the metadata about a specific type of Complex object.

let complexType = new ComplexType( {
    shortName: "address",
    namespace: "myAppNamespace"
});
param

Configuration settings

Hierarchy

  • ComplexType

Index

Constructors

constructor

Properties

addValidator

addValidator: addValidator = EntityType.prototype.addValidator

See [EntityType.addValidator]

complexProperties

complexProperties: DataProperty[]

The DataProperties for this ComplexType that contain instances of a ComplexType. Read Only

concurrencyProperties

concurrencyProperties: DataProperty[]

For polymorphic purpose only - always empty here

createInstance

createInstance: createEntity = EntityType.prototype.createEntity

Optional custom

custom: any

A free form object that can be used to define any custom metadata for this ComplexType.

dataProperties

dataProperties: DataProperty[]

The DataProperties (see DataProperty associated with this ComplexType. Read Only

getCtor

getCtor: getCtor = EntityType.prototype.getCtor

getPropertiesOnPath

getPropertiesOnPath: getPropertiesOnPath = EntityType.prototype.getPropertiesOnPath

getProperty

getProperty: getProperty = EntityType.prototype.getProperty

getPropertyNames

getPropertyNames: getPropertyNames = EntityType.prototype.getPropertyNames

isComplexType

isComplexType: boolean = true

For polymorphic purpose only - always true here

keyProperties

keyProperties: DataProperty[]

metadataStore

metadataStore: MetadataStore

The MetadataStore containing this ComplexType.

name

name: string

The fully qualifed name of this ComplexType. Read Only

namespace

namespace: string

The namespace for this ComplexType. Read Only

navigationProperties

navigationProperties: DataProperty[]

Optional serializerFn

serializerFn: (prop: EntityProperty, val: any) => any

Type declaration

shortName

shortName: string

The short, unqualified, name for this ComplexType. Read Only

unmappedProperties

unmappedProperties: DataProperty[]

The DataProperties associated with this ComplexType that are not mapped to any backend datastore. These are effectively free standing properties. Read Only

validators

validators: Validator[]

The entity level validators associated with this ComplexType. Validators can be added and removed from this collection. Read Only

warnings

warnings: any[]

Methods

addProperty

getAllValidators

getProperties

setProperties

  • setProperties(config: { custom?: Object }): void
  • General purpose property set method

     // assume em1 is an EntityManager
     let addresstType = em1.metadataStore.getEntityType("Address");
     addressType.setProperties( {
         custom: { foo: 7, bar: "test" }
     });
    

    Parameters

    • config: { custom?: Object }

      Custom config object

      • Optional custom?: Object

        {Object}

    Returns void

toJSON

  • toJSON(): Object

Generated using TypeDoc