new DataStore()

Creates a new data store object.

Methods

getValue(property) → any type

Gets the value of a model property.

Parameter

Name Type Optional Description

property

bo.shared.PropertyInfo

 

The definition of the model property.

Throws

Argument error: The property must be a PropertyInfo object.

Returns

any type The current value of the property.

hasValidValue(property) → boolean

Indicates whether a property has a valid value.

Parameter

Name Type Optional Description

property

bo.shared.PropertyInfo

 

The definition of the model property.

Returns

boolean True if the property has a valid value, otherwise false.

initValue(property, value)

Initializes the value of a property in the store.

Parameters

Name Type Optional Description

property

bo.shared.PropertyInfo

 

The definition of the model property.

value

any type

 

The default value of the property (null or a child model).

Throws

Argument error: The property must be a PropertyInfo object.

Argument error: The value must be null, a model or a collection.

setValue(property, value) → boolean

Sets the value of a model property.

Parameters

Name Type Optional Description

property

bo.shared.PropertyInfo

 

The definition of the model property.

value

any type

 

The new value of the property.

Throws

Argument error: The property must be a PropertyInfo object.

Argument error: The value must be defined.

Returns

boolean True if the value of the property has been changed, otherwise false.