Contains data access components.
Properties:
Name | Type | Description |
---|---|---|
ConnectionManagerBase |
function | Base connection manager constructor to create new connection manager objects. |
daoBuilder |
function | Data access object builder function to get data access objects. |
DaoBase |
function | Data access object constructor to create new data access objects. |
DaoError |
function | Data access error constructor to create new errors occurred in data access objects. |
Classes
Methods
-
<static> daoBuilder(dataSource, modelPath, modelName) → {bo.dataAccess.DaoBase}
-
Factory method to create the data access object for a model instance. The path of the data access object is created using the model path and inserted the data source string before the extension. (The model name is not used by this implementation.)
Parameters:
Name Type Description dataSource
string The name of the data source.
modelPath
string The model definition path of the business object model instance that the data access object belongs to.
modelName
string The name of the business object model.
Throws:
-
Dao error: The name of the data source must be a non-empty string.
-
Dao error: The model path must be a non-empty string.
-
Dao error: The model path is not a valid file path.
-
Dao error: The required data access file does not exist.
-
Dao error: The data access file must return a constructor.
-
Dao error: The data access object must inherit DaoBase type.
Returns:
The data access object of the business object model.
Example
daoBuilder('oracle', '/path/to/model.js') // returns require('/path/to/model.oracle.js')
-