arlas-wui-toolkit / Exports / ArlasPersistenceDatabase

Class: ArlasPersistenceDatabase<T>

Type parameters

Name Type
T extends ArlasStorageObject

Hierarchy

  • ArlasPersistenceDatabase

BookmarkPersistenceDatabase

ExtendPersistenceDatabase

Table of contents

Constructors

Properties

Accessors

Methods

Constructors

constructor

new ArlasPersistenceDatabase<T>(storageKy?, persistenceService, additionalObject?)

Type parameters

Name Type
T extends ArlasStorageObject

Parameters

Name Type Default value
storageKy string 'storage_object'
persistenceService PersistenceService undefined
additionalObject? any undefined

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:41

Properties

additionalObject

additionalObject: any

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:37


dataChange

dataChange: BehaviorSubject<{ items: T[] ; total: number }>

Stream that emits whenever the data has been modified.

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:27


persistenceService

persistenceService: PersistenceService

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:36


storageKey

storageKey: string

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:35


storageObjectMap

storageObjectMap: Map<string, T>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:32

Accessors

data

get data(): Object

Returns

Object

Name Type
items T[]
total number

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:29

Methods

add

add(storageObject): Observable<void>

Parameters

Name Type
storageObject T

Returns

Observable<void>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:56


init

init(obj, additionnalObj?): T

Method call for each element at init

Parameters

Name Type Description
obj T Object to init of type
additionnalObj? any Addtionnal object

Returns

T

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:52


list

list(size, page, order, key?): Observable<void>

Parameters

Name Type Default value
size number undefined
page number undefined
order string undefined
key any undefined

Returns

Observable<void>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:79


remove

remove(id): Observable<void>

Parameters

Name Type
id string

Returns

Observable<void>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:72


setPage

setPage(page): void

Parameters

Name Type
page Object
page.number number
page.size number

Returns

void

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:105


update

update(id, storageObject): Observable<void>

Parameters

Name Type
id string
storageObject T

Returns

Observable<void>

Defined in

projects/arlas-toolkit/src/lib/tools/arlasPersistenceDatabase.ts:96