Class: DefaultCollectionBroker<T, M>
Type parameters
Name | Type |
---|---|
T | any |
M | extends ItemMeta ItemMeta |
Implements
CollectionBroker
<T
,M
>
Constructors
constructor
• new DefaultCollectionBroker<T
, M
>()
Type parameters
Name | Type |
---|---|
T | any |
M | extends ItemMeta ItemMeta |
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
Name | Type |
---|---|
filterOrCriteria | QueryFilterOrCriteria |
parentFilterId | QueryFilterId |
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
Name | Type |
---|---|
field | string |
operator | QueryFilterCriteriaOperator |
value | null | 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
Name | Type |
---|---|
sortBy | QuerySortBy |
prepend? | boolean |
Returns
void
Implementation of
CollectionBroker.addSortBy
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:64
addSubscriber
▸ addSubscriber(subscriber
): void
Parameters
Name | Type |
---|---|
subscriber | Collection <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
Name | Type |
---|---|
key | string |
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
Name | Type |
---|---|
filter | QueryFilter | QueryFilterCriteria | QueryFilterOrCriteria [] |
Returns
void
Implementation of
CollectionBroker.filter
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:123
removeFilter
▸ removeFilter(id
): void
Parameters
Name | Type |
---|---|
id | QueryFilterId |
Returns
void
Implementation of
CollectionBroker.removeFilter
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:140
removeSortBy
▸ removeSortBy(id
): void
Parameters
Name | Type |
---|---|
id | string |
Returns
void
Implementation of
CollectionBroker.removeSortBy
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:145
removeSubscriber
▸ removeSubscriber(subscriber
): void
Parameters
Name | Type |
---|---|
subscriber | Collection <T , M > |
Returns
void
Implementation of
CollectionBroker.removeSubscriber
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:150
search
▸ search(search
): void
Parameters
Name | Type |
---|---|
search | Primitive |
Returns
void
Implementation of
CollectionBroker.search
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:155
setData
▸ setData(data
): void
Parameters
Name | Type |
---|---|
data | T [] |
Returns
void
Implementation of
CollectionBroker.setData
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:160
setFields
▸ setFields(fields
): void
Parameters
Name | Type |
---|---|
fields | string [] |
Returns
void
Implementation of
CollectionBroker.setFields
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:165
setParam
▸ setParam(key
, value
): void
Parameters
Name | Type |
---|---|
key | string |
value | any |
Returns
void
Implementation of
CollectionBroker.setParam
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:171
setParams
▸ setParams(params
): void
Parameters
Name | Type |
---|---|
params | AnonymousObject <any > |
Returns
void
Implementation of
CollectionBroker.setParams
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:176
sort
▸ sort(dir
): void
Parameters
Name | Type |
---|---|
dir | QuerySortDir |
Returns
void
Implementation of
CollectionBroker.sort
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:181
sortBy
▸ sortBy(sortBy
): void
Parameters
Name | Type |
---|---|
sortBy | string | QuerySortBy | QuerySortBy [] |
Returns
void
Implementation of
CollectionBroker.sortBy
Defined in
onekijs/packages/onekijs-framework/src/collection/CollectionBroker.ts:186