Class: DaoBase

bo.dataAccess. DaoBase

Serves as the base class for data access objects.

new DaoBase(name)

Creates a new data access object.

Parameters:
Name Type Description
name string

The name of the data access object.

Throws:
Dao error: The data access object name must be a non-empty string.

Members

<readonly> name :string

The name of the data access object.

Type:
  • string

Methods

$hasCreate() → {boolean}

Determines if create method exists.

Returns:

True when create method exists, otherwise false.

Type
boolean

$runMethod(methodName, methodArg) → {*}

Executes the named method on the data access object.

Parameters:
Name Type Argument Description
methodName string

The name of the method to check.

methodArg * <optional>
<repeatable>

The arguments of the method to execute. The last argument must be a callback function in case of asynchronous models.

Throws:
  • Dao error: The method name must be a non-empty string.
  • Dao error: Data access object has no method with the requested name.
Returns:

The result of the method (for synchronous models).

Type
*
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.