Skip to main content

Class: DefaultCollectionBroker<T, M>

Type parameters

NameType
Tany
Mextends ItemMetaItemMeta

Implements

Constructors

constructor

new DefaultCollectionBroker<T, M>()

Type parameters

NameType
Tany
Mextends ItemMetaItemMeta

Properties

currentSearch

Protected currentSearch: undefined | Primitive

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:28


currentSort

Protected currentSort: undefined | QuerySortDir

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:29


data

Protected data: undefined | T[]

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:30


fields

Protected fields: string[] = []

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:26


filters

Protected filters: { filter: QueryFilter ; id?: QueryFilterId ; parentFilterId: QueryFilterId }[] = []

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:20


params

Protected params: AnonymousObject<any> = {}

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:27


sortBys

Protected sortBys: { id?: string ; sortBy: QuerySortBy }[] = []

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:25


subscribers

Protected subscribers: Collection<T, M>[] = []

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:19

Methods

addFilter

addFilter(filterOrCriteria, parentFilterId?): void

Parameters

NameType
filterOrCriteriaQueryFilterOrCriteria
parentFilterIdQueryFilterId

Returns

void

Implementation of

CollectionBroker.addFilter

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:32


addFilterCriteria

addFilterCriteria(field, operator, value, not?, id?, parentFilterId?): void

Parameters

NameType
fieldstring
operatorQueryFilterCriteriaOperator
valuenull | string | number | boolean | QueryFilterCriteriaValue[]
not?boolean
id?string | number | symbol
parentFilterId?string | number | symbol

Returns

void

Implementation of

CollectionBroker.addFilterCriteria

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:44


addSortBy

addSortBy(sortBy, prepend?): void

Parameters

NameType
sortByQuerySortBy
prepend?boolean

Returns

void

Implementation of

CollectionBroker.addSortBy

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:64


addSubscriber

addSubscriber(subscriber): void

Parameters

NameType
subscriberCollection<T, M>

Returns

void

Implementation of

CollectionBroker.addSubscriber

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:80


clearFields

clearFields(): void

Returns

void

Implementation of

CollectionBroker.clearFields

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:88


clearFilter

clearFilter(): void

Returns

void

Implementation of

CollectionBroker.clearFilter

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:93


clearParam

clearParam(key): void

Parameters

NameType
keystring

Returns

void

Implementation of

CollectionBroker.clearParam

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:98


clearParams

clearParams(): void

Returns

void

Implementation of

CollectionBroker.clearParams

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:103


clearSearch

clearSearch(): void

Returns

void

Implementation of

CollectionBroker.clearSearch

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:108


clearSort

clearSort(): void

Returns

void

Implementation of

CollectionBroker.clearSort

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:113


clearSortBy

clearSortBy(): void

Returns

void

Implementation of

CollectionBroker.clearSortBy

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:118


filter

filter(filter): void

Parameters

NameType
filterQueryFilter | QueryFilterCriteria | QueryFilterOrCriteria[]

Returns

void

Implementation of

CollectionBroker.filter

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:123


removeFilter

removeFilter(id): void

Parameters

NameType
idQueryFilterId

Returns

void

Implementation of

CollectionBroker.removeFilter

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:140


removeSortBy

removeSortBy(id): void

Parameters

NameType
idstring

Returns

void

Implementation of

CollectionBroker.removeSortBy

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:145


removeSubscriber

removeSubscriber(subscriber): void

Parameters

NameType
subscriberCollection<T, M>

Returns

void

Implementation of

CollectionBroker.removeSubscriber

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:150


search(search): void

Parameters

NameType
searchPrimitive

Returns

void

Implementation of

CollectionBroker.search

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:155


setData

setData(data): void

Parameters

NameType
dataT[]

Returns

void

Implementation of

CollectionBroker.setData

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:160


setFields

setFields(fields): void

Parameters

NameType
fieldsstring[]

Returns

void

Implementation of

CollectionBroker.setFields

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:165


setParam

setParam(key, value): void

Parameters

NameType
keystring
valueany

Returns

void

Implementation of

CollectionBroker.setParam

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:171


setParams

setParams(params): void

Parameters

NameType
paramsAnonymousObject<any>

Returns

void

Implementation of

CollectionBroker.setParams

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:176


sort

sort(dir): void

Parameters

NameType
dirQuerySortDir

Returns

void

Implementation of

CollectionBroker.sort

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:181


sortBy

sortBy(sortBy): void

Parameters

NameType
sortBystring | QuerySortBy | QuerySortBy[]

Returns

void

Implementation of

CollectionBroker.sortBy

Defined in

onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:186