The 'Object Column' class inherits the 'Base Column' to define a column that addresses object properties. This class provides properties loading, serializing and setting of columns, and replicating columns.

Hierarchy (view full)

Constructors

  • Creates an object 'ObjectColumn'.

    Parameters

    • name: string

      The name of the object column.

    • entity: BaseEntity

      'BaseEntity' object that owns this column.

    • prop: object

      Properties of the object column.

    Returns ObjectColumn

Properties

_entity: BaseEntity

Indicates the entity to which this column belongs. Object of type 'BaseEntity'.

_guid: string

Unique identifier of the object (GUID). Uniquely identifies the object.

_name: string

The name of the element, which acts as a unique identifier for the MetaElement.

_type: Function

The generator function of the object. The function used when the object was created.

_valueTypes: any

Defines the value type for the column. This property is used to set the value type for the column.

$alias: string

Indicates the alias for the column. The alias is used as another name for the column.

$key: string

Indicates the unique key for this column.

$value: string

Internal value of the column value.

alias: string

Sets or imports aliases for columns. Aliases are used to transfer data and set low values. Where to use (default = columnName)

  • Bind-command-ajax._execBind(): When transmitting data
  • BaseBind.setValue(row): When setting a low value to an entity
  • getValue(): Used for row
caption: string

Provides a description of the column.

columnName: string

Indicates the name of the column. Same as '_name'.

default: string | number | boolean

Sets the default value for the column.

value: any

Gets or sets the current value of the column.

_NS: string

Indicates the namespace.

'Meta'
_PARAM: []

List of parameters used for the constructor.

['name']
_UNION: []

List of implemented interfaces.

[IElement]

Methods

  • Loads the properties of the object.

    Parameters

    • prop: object

      Property object to load.

    Returns void

    objectColumn._load ({key: 'value'}); // Load the property and apply it to the column
    
  • Replicate the 'Object Column' object to create a new object.

    Parameters

    • Optionalentity: BaseEntity

      The entity to be replicated, if not specified, will be replicated to the current entity.

    Returns this

    Replicated 'ObjectColumn' object.

    const clone = objectColumn.clone(); // Replicate columns to current entity
    const clusteredWithEntity = objectColumn.clone; // Replicate columns to specified entities
  • Compare the current object with the specified object.

    Parameters

    • target: object

      the object to be compared to.

    Returns boolean

    Returns whether the two objects are the same.

  • Converts the current 'Object Column' object to a serialized GUID type object. In the serialization process, the cyclic reference is replaced by the value '$ref'.

    Parameters

    • OptionalvOpt: number

      Serialization option.

      • '0': Convert to a reference structure (including '_guid' and '$ref')
      • '1': Converting to a redundant structure (including '_guid' and '$ref')
      • '2': Conversion to non-coordinated structure (excluding '_guid' and '$ref')
    • Optionalowned: object | object[]

      The parent objects that currently own the object. You can receive an object or array of objects.

    Returns object

    Serialized object.

    const serialized = objectColumn.getObject(1); // Import serialized objects into reference structures
    
  • Returns the creators of the current object and all the creators of the prototype chain to the array.

    Returns Function[]

    Returns the array of generator functions.

    const types = obj.getTypes();
    console.log(types); // [Function: MetaObject]
  • Verify that the current object is an instance of the specified type (including _UNION)

    Parameters

    • target: string | object

      The type of object to be checked (object or string).

    Returns boolean

    Returns whether it is an instance of the specified type.

  • Sets the serialized GUID type object to the current 'Object Column' object. During this process, the object is initialized.

    Parameters

    • oGuid: object

      object of serialized GUID type.

    • Optionalorigin: object

      This is the original object that sets the current object. Default is 'oGuid'.

    Returns void

    objectColumn.setObject(serializedObject); // Set serialized objects to the current column