Manual Reference Source Test
import Helper from 'clinical6/src/helpers/Helper.js'
public class | source

Helper

The base class for helper classes

Static Member Summary

Static Public Members
public static get

Member Summary

Public Members
public get
public set
public get
public get
Private Members
private
private

Method Summary

Public Methods
public

async clear(): *

Remove this object from storage

public

Deserialies the relationship stubs prior to synching with database

public

Get the relationship from storage or if it's already associated based on the type and id.

public

Initializer for the helper function

public

async load(): *

Load this object from storage.

public

async store(): *

Store this object into storage

public

async syncRelationships(json: *): Promise

Synchronize the relationships from storage to the current object

public

Default toJSON for json api format

Static Public Members

public static get type: String source

Public Members

public get meta: Object source

public set meta: Object source

public get relationships: Object source

public get type: String source

Private Members

private _meta: Object source

private _relationships: {} source

Public Methods

public async clear(): * source

Remove this object from storage

Return:

*

public deserializeRelationshipStubs(json: Object) source

Deserialies the relationship stubs prior to synching with database

Params:

NameTypeAttributeDescription
json Object

Must be in JsonAPI Format

public async getRelationship(obj: Object): Promise source

Get the relationship from storage or if it's already associated based on the type and id.

Params:

NameTypeAttributeDescription
obj Object

Get relationship based on json api relationship object

obj.id Number

The object id

obj.type String

The object type

Return:

Promise

Returns a Promise with the object from the relationship

public initializer() source

Initializer for the helper function

public async load(): * source

Load this object from storage.

Return:

*

public async store(): * source

Store this object into storage

Return:

*

public async syncRelationships(json: *): Promise source

Synchronize the relationships from storage to the current object

Params:

NameTypeAttributeDescription
json *

Return:

Promise

public toJSON(): Object source

Default toJSON for json api format

Return:

Object

returns json useable for json api