new ExtensionManagerBase(dataSource, modelPath, addArgs)

Creates a new base extension manager object.

Parameters

Name Type Optional 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

Argument error: The data source must be a non-empty string.

Argument error: The model path must be a non-empty string.

Argument error: The additional argument count must be an integer.

Properties

read-only
daoBuilder  external.daoBuilder

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

read-only
dataCreate  external.dataCreate

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

read-only
dataExecute  external.dataExecute

Executes a command on the data source.

read-only
dataFetch  external.dataFetch

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

read-only
dataInsert  external.dataInsert

Saves a new instance into the data source.

read-only
dataRemove  external.dataRemove

Deletes an existing instance from the data source.

read-only
dataSource  string

The name of the data source.

read-only
dataUpdate  external.dataUpdate

Saves an existing instance into the data source.

read-only
fromCto  external.fromCto

Converts the client transfer object to model instance.

read-only
fromDto  external.fromDto

Converts the data transfer object to model instance.

read-only
modelPath  string

The path of the model definition.

read-only
toCto  external.toCto

Converts the model instance to client transfer object.

read-only
toDto  external.toDto

Converts the model instance to data transfer object.

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.)

Parameter

Name Type Optional 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 Optional 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.

Parameter

Name Type Optional Description

modelName

string

 

The name of the model.

Returns

bo.dataAccess.DaoBase The data access object instance of the model.