new DataStore()
Creates a new data store object.
Methods
-
getValue(property) → {*}
-
Gets the value of a model property.
Parameters:
Name Type Description property
bo.shared.PropertyInfo The definition of the model property.
Throws:
Argument error: The property must be a PropertyInfo object.Returns:
The current value of the property.
- Type
- *
-
hasValidValue(property) → {boolean}
-
Indicates whether a property has a valid value.
Parameters:
Name Type Description property
bo.shared.PropertyInfo The definition of the model property.
Returns:
True if the property has a valid value, otherwise false.
- Type
- boolean
-
initValue(property, value)
-
Initializes the value of a property in the store.
Parameters:
Name Type Description property
bo.shared.PropertyInfo The definition of the model property.
value
* 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 Description property
bo.shared.PropertyInfo The definition of the model property.
value
* The new value of the property.
Throws:
-
Argument error: The property must be a PropertyInfo object.
-
Argument error: The value must be defined.
Returns:
True if the value of the property has been changed, otherwise false.
- Type
- boolean
-