Manager
Manage Vo items, sending and getting them to the Storage
Constructor Summary
Public Constructor | ||
public |
constructor(storage: *) |
Member Summary
Public Members | ||
public get |
availableMethods: String[]: * Get the list of Class available methods |
|
public |
storage: Storage |
Method Summary
Public Methods | ||
public |
assumeIsOwnVoClass(vo: Vo) Make sure an object has the current Manager Vo class |
|
public |
Delete a list of Vo in storage |
|
public |
Delete a vo in storage |
|
public |
Get a list of Vo |
|
public |
Get a list of all error of a Vo |
|
public |
getByPage(criteria: Object, page: integer, limit: integer, orderby: string, order: string): Promise<Vo[], Error> Get a paginated list of Vo |
|
public |
getByUniqueProperty(property: string, value: any): Promise<Vo, Error> Get a Vo from a unique property value |
|
public |
getByUniquePropertyM(property: string, values: any[]): Promise<Vo[], Error> Get a list of Vo from a unique property and many values |
|
public |
Get a new Vo, and fill it with data if any |
|
public |
getVoBusinessErrors(vo: Vo): Promise<object, Error> Get a list of the properties business errors of a Vo. |
|
public |
getVoFormatErrors(vo: Vo): Promise<object, Error> Get a list of the properties format error of a Vo |
|
public |
getVoUniqueErrors(vo: Vo): Promise<object, Error> Get a list of the unique properties error of a Vo |
|
public |
Insert a vo in storage |
|
public |
Save a vo in storage, update if exists, or insert |
|
public |
Update a vo in storage |
Public Constructors
public constructor(storage: *) source
Params:
Name | Type | Attribute | Description |
storage | * |
Public Members
public storage: Storage source
Public Methods
public assumeIsOwnVoClass(vo: Vo) source
Make sure an object has the current Manager Vo class
Params:
Name | Type | Attribute | Description |
vo | Vo |
public delete(Vo: Vo[]): Promise<boolean, Error> source
Delete a list of Vo in storage
Params:
Name | Type | Attribute | Description |
Vo | Vo[] | to delete |
public deleteOne(vo: Vo): Promise<boolean, Error> source
Delete a vo in storage
Params:
Name | Type | Attribute | Description |
vo | Vo |
public getAllVoErrors(vo: Vo, skipProperties: string[]): Promise<object, Error> source
Get a list of all error of a Vo
public getByPage(criteria: Object, page: integer, limit: integer, orderby: string, order: string): Promise<Vo[], Error> source
Get a paginated list of Vo
public getByUniqueProperty(property: string, value: any): Promise<Vo, Error> source
Get a Vo from a unique property value
Params:
Name | Type | Attribute | Description |
property | string | ||
value | any | the unique property value to look for |
public getByUniquePropertyM(property: string, values: any[]): Promise<Vo[], Error> source
Get a list of Vo from a unique property and many values
Params:
Name | Type | Attribute | Description |
property | string | ||
values | any[] | the unique property value to look for |
public getNewVo(data: object): Vo source
Get a new Vo, and fill it with data if any
Params:
Name | Type | Attribute | Description |
data | object |
|
public getVoBusinessErrors(vo: Vo): Promise<object, Error> source
Get a list of the properties business errors of a Vo. To be override by business specific needs
Params:
Name | Type | Attribute | Description |
vo | Vo | the Vo to check |
public getVoFormatErrors(vo: Vo): Promise<object, Error> source
Get a list of the properties format error of a Vo
Params:
Name | Type | Attribute | Description |
vo | Vo | the Vo to check |
public getVoUniqueErrors(vo: Vo): Promise<object, Error> source
Get a list of the unique properties error of a Vo
Params:
Name | Type | Attribute | Description |
vo | Vo | the Vo to check |
public insertOne(vo: Vo): Promise<Vo[], Error> source
Insert a vo in storage
Params:
Name | Type | Attribute | Description |
vo | Vo |