Class: ExtensionManagerBase

bo.shared. ExtensionManagerBase

Provides properties to customize models' behavior.

new ExtensionManagerBase(dataSource, modelPath, addArgs)

Creates a new base extension manager object.

Parameters:
Name Type Description
dataSource string

The name of the data source.

modelPath string

The full path of the model.

addArgs number

The count of additional arguments for data portal methods of a model group.

Throws:

Members

<readonly> daoBuilder :external.daoBuilder

Factory method to create the data access object for a model instance.

Type:

<readonly> dataCreate :external.dataCreate

Returns the property values of a new instance from the data source.

Type:

<readonly> dataExecute :external.dataExecute

Executes a command on the data source.

Type:

<readonly> dataFetch :external.dataFetch

Returns the property values of an existing instance from the data source.

Type:

<readonly> dataInsert :external.dataInsert

Saves a new instance into the data source.

Type:

<readonly> dataRemove :external.dataRemove

Deletes an existing instance from the data source.

Type:

<readonly> dataSource :string

The name of the data source.

Type:
  • string

<readonly> dataUpdate :external.dataUpdate

Saves an existing instance into the data source.

Type:

<readonly> fromCto :external.fromCto

Converts the client transfer object to model instance.

Type:

<readonly> fromDto :external.fromDto

Converts the data transfer object to model instance.

Type:

<readonly> modelPath :string

The path of the model definition.

Type:
  • string

<readonly> toCto :external.toCto

Converts the model instance to client transfer object.

Type:

<readonly> toDto :external.toDto

Converts the model instance to data transfer object.

Type:

Methods

addOtherMethod(methodName)

Adds a new instance method to the model. (The method will call a custom execute method on the data business object of command object.)

Parameters:
Name Type Description
methodName string

The name of the method on the data access object to be called.

<protected> buildOtherMethods(instance, isSync)

Instantiate the defined custom methods on the model instance. (The method is currently used by command objects only.)

Parameters:
Name Type Description
instance ModelBase

An instance of the model.

isSync boolean

Indicates whether the model is synchronous or asynchronous.

<protected> getDataAccessObject(modelName) → {bo.dataAccess.DaoBase}

Gets the data access object instance of the model.

Parameters:
Name Type Description
modelName string

The name of the model.

Returns:

The data access object instance of the model.

Type
bo.dataAccess.DaoBase
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.