File

src/lib/services/sz-search.service.ts

Index

Properties
Methods

Constructor

constructor(entityDataService: EntityDataService, configService: ConfigService)
Parameters :
Name Type Optional
entityDataService EntityDataService No
configService ConfigService No

Methods

Public clearCurrentSearchState
clearCurrentSearchState()

clears out current search parameters and search results.

Returns : void
Public getAttributeTypes
getAttributeTypes()

get list of characteristics as attribute types

Returns : Observable<SzAttributeType[]>
Public getEntitiesByIds
getEntitiesByIds(entityIds: SzEntityIdentifiers, withRelated, detailLevel)

get the SzEntityData[] responses for multiple entities

Parameters :
Name Type Optional Default value
entityIds SzEntityIdentifiers No
withRelated No false
detailLevel No SzDetailLevel.VERBOSE
Returns : Observable<SzEntityData[]>
Public getEntityById
getEntityById(entityId: SzEntityIdentifier, withRelated, detailLevel)

get an SzEntityData model by providing an entityId.

Parameters :
Name Type Optional Default value
entityId SzEntityIdentifier No
withRelated No false
detailLevel No SzDetailLevel.VERBOSE
Returns : Observable<SzEntityData>
Public getEntityByRecordId
getEntityByRecordId(dsName: string, recordId: string | number, withRelated, detailLevel)

get an SzEntityData model by providing an datasource and record id.

Parameters :
Name Type Optional Default value
dsName string No
recordId string | number No
withRelated No false
detailLevel No SzDetailLevel.SUMMARY
Returns : Observable<SzEntityData>
Public getMappingAttributes
getMappingAttributes()
Returns : Observable<SzAttributeType[]>
Public getRecordById
getRecordById(dsName: string, recordId: string | number, withRelated)

get an SzEntityRecord model by providing an datasource and record id.

Parameters :
Name Type Optional Default value
dsName string No
recordId string | number No
withRelated No false
Returns : Observable<SzEntityRecord>
Public getSearchParams
getSearchParams()

get the current search params.

Public getSearchResults
getSearchResults()

get the current search results from the last search.

Returns : [] | null
Public searchByAttributes
searchByAttributes(searchParms: SzEntitySearchParams)

perform a search request againt the data source.

Parameters :
Name Type Optional
searchParms SzEntitySearchParams No
Returns : Observable<SzAttributeSearchResult[]>
Public setSearchParam
setSearchParam(paramName: any, value: any)

set an individual search parameter.

Parameters :
Name Type Optional
paramName any No
value any No
Returns : void
Public setSearchResults
setSearchResults(results: SzAttributeSearchResult[] | null)

set the current search results from the last search.

Parameters :
Name Type Optional
results SzAttributeSearchResult[] | null No
Returns : void

Properties

Public parametersChanged
Default value : new Subject<SzEntitySearchParams>()
Public resultsChanged
Default value : new Subject<SzAttributeSearchResult[]>()
Public searchPerformed
Default value : new Subject<SzSearchEvent>()

results matching ""

    No results matching ""