API Docs for:
Show:

BaseModule Class

Module of DDD pattern.

Methods

createFactory

(
  • modFirstName
)
BaseFactory

create a factory instance 2nd, 3rd, 4th ... arguments are the params to pass to the constructor of the factory

Parameters:

  • modFirstName String

Returns:

createModel

(
  • modFirstName
  • obj
  • [options]
  • [root]
)
BaseModel

create an instance of the given modFirstName using obj if obj is null or undefined, empty object will be created.

Parameters:

  • modFirstName String
  • obj Object
  • [options] Object optional
  • [root] RootInterface optional

Returns:

createPreferredFactory

(
  • modFirstName
  • [options]
)
BaseFactory

create a preferred factory instance 3rd, 4th ... arguments are the params to pass to the constructor of the factory

Parameters:

  • modFirstName String
  • [options] Object optional
    • [noParent=true] Object optional

      if true, stop requiring parent class

Returns:

createPreferredRepository

(
  • modFirstName
  • [options]
)
BaseRepository

create a preferred repository instance 3rd, 4th ... arguments are the params to pass to the constructor of the repository

Parameters:

  • modFirstName String
  • [options] Object optional
    • [noParent] Object optional

      if true, stop requiring parent class

Returns:

createPreferredService

(
  • modFirstName
  • [options]
)
BaseService

create a preferred service instance 2nd, 3rd, 4th ... arguments are the params to pass to the constructor of the factory

Parameters:

  • modFirstName String
  • [options] Object optional
    • [noParent=true] Object optional

      if true, stop requiring parent class

Returns:

createRepository

(
  • modFirstName
)
BaseRepository

create a repository instance 2nd, 3rd, 4th ... arguments are the params to pass to the constructor of the repository

Parameters:

  • modFirstName String

Returns:

createService

(
  • modFirstName
)
BaseService

create a service instance 2nd, 3rd, 4th ... arguments are the params to pass to the constructor of the service

Parameters:

  • modFirstName String

Returns:

getFacade

() Facade deprecated chainable

Defined in /home/ubuntu/base-domain/src/lib/base-module.coffee:24

Deprecated: just call facade property

Get facade

Returns:

getModel

(
  • firstName
)
Function

get a model class in the module

Parameters:

  • firstName String

Returns:

Function:

require

(
  • modFullName
)
Function private

read a file and returns class

Parameters:

  • modFullName String

Returns:

Function:

Properties

isRoot

Boolean static

is root (to identify RootInterface)