API Docs for:
Show:

RootInterface Class

interface of Aggregate Root

Followings are the meanings of argument name of files in detail. Let's see difference with two file examples.

  • A: core/post-submission-service
  • B: server/diary-factory

  • firstName: A => post-submission, B => diary

  • fullName: A => post-submission-service, B => diary-factory
  • modFirstName: A => core/post-submission | post-submission, B => server/diary
  • modFullName: A => core/post-submission-service, | post-submission-service, B => server/diary-factory

"mod" requires module name except "core" module, which can be omitted

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

Returns:

createPreferredFactory

(
  • firstName
  • [options]
)
BaseFactory

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

Parameters:

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

      if true, stop requiring parent class

Returns:

createPreferredRepository

(
  • firstName
  • [options]
)
BaseRepository

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

Parameters:

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

      if true, stop requiring parent class

Returns:

createPreferredService

(
  • firstName
  • [options]
)
BaseService

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

Parameters:

  • firstName 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

(
  • name
)
BaseRepository

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

Parameters:

  • name String

Returns:

getModule

() BaseModule

get module the class belongs to

Returns:

Properties

isRoot

Boolean static

is root (to identify RootInterface)