Class: PropertyInfo

bo.shared. PropertyInfo

Defines a property of a business object model.

new PropertyInfo(name, type, flags, getter, setter)

Creates a new property definition.

The data type can be any one from the bo.dataTypes namespace or a custom data type based on DataType object, or can be any business object model or collection defined by the model types available in the bo namespace (i.e. models based on ModelBase or {@link bo.CollectionBase CollectionBase} objects).

The flags parameter is ignored when data type is a model or collection.

Parameters:
Name Type Argument Description
name string

The name of the property.

type *

The data type of the property.

flags bo.shared.PropertyFlag <optional>

Other attributes of the property.

getter external.propertyGetter <optional>

Custom function to read the value of the property.

setter external.propertySetter <optional>

Custom function to write the value of the property.

Throws:

Members

<readonly> getter :external.propertyGetter

The custom getter function of the property.

Type:

<readonly> isKey :string

Indicates if the property is a key element.

Type:
  • string

<readonly> isOnCto :string

Indicates whether the value of the property would be passed to the client or would be received from the client, respectively.

Type:
  • string

<readonly> isOnDto :string

Indicates whether the value of the property would be passed to the data access object or would be received from the data access object, respectively.

Type:
  • string

<readonly> isParentKey :string

Indicates if the property is a key element of the parent object.

Type:
  • string

<readonly> isReadOnly :string

Indicates whether the value of the property can be modified.

Type:
  • string

<readonly> name :string

The name of the property.

Type:
  • string

<readonly> setter :external.propertySetter

The custom setter function of the property.

Type:

<readonly> type :*

The data type of the property.

The data type can be any one from the bo.dataTypes namespace or a custom data type based on DataType object, or can be any business object model or collection defined by the model types available in the bo namespace (i.e. models based on ModelBase or {@link bo.CollectionBase CollectionBase} objects).

Type:
  • *

Methods

hasValue(value) → {boolean}

Checks if value has the appropriate type and it is not null, and not empty in case of Text data type.

Parameters:
Name Type Description
value data

The value to check.

Returns:

True if the value is neither null nor empty, otherwise false.

Type
boolean
If you find bugs or have feature requests, please let us know.

JavaScript business objects ♦ Copyright © 2014-2016 Logikum, Ltd.
Documentation generated by JSDoc 3.2.2 on 2015. December 31. using the DocStrap template.