Skip to main content

RepositoryInterface <T>

Implemented by

Index

Properties

className

className: string

classType

classType: typeof Model

completeChunks

completeChunks: number

events

events: Events

hasMore

hasMore: boolean

loaded

loaded: boolean

middlewares

middlewares: MiddlewareList

noFiltersNoLoad

noFiltersNoLoad: boolean

objects

objects: ArrayIndexed<T>

path

path: string

query

query: Query

optionalschema

schema?: Schema

server

server: Server

Methods

create

  • create(object: any): JQueryDeferred<T>
  • Parameters

    • object: any

    Returns JQueryDeferred<T>

defaultResponseMiddleware

  • defaultResponseMiddleware(data: unknown, ctx: MapsvgCtx): Record<string, unknown>
  • Parameters

    Returns Record<string, unknown>

delete

  • delete(id: string | number): JQueryDeferred<void>
  • Parameters

    • id: string | number

    Returns JQueryDeferred<void>

encodeData

  • encodeData(params: any): {}
  • Parameters

    • params: any

    Returns {}

    • [key string]: any

find

  • find(params?: Query): JQueryDeferred<any>
  • Parameters

    Returns JQueryDeferred<any>

findById

  • findById(id: string | number): JQueryDeferred<T>
  • Parameters

    • id: string | number

    Returns JQueryDeferred<T>

getLoaded

getLoadedAsArray

getLoadedObject

  • getLoadedObject(id: string | number): T
  • Parameters

    • id: string | number

    Returns T

getSchema

loadDataFromResponse

  • loadDataFromResponse(data: string | Record<string, any>, ctx: MapsvgCtx): void
  • Parameters

    • data: string | Record<string, any>
    • ctx: MapsvgCtx

    Returns void

onFirstPage

  • onFirstPage(): boolean
  • Returns boolean

onLastPage

  • onLastPage(): boolean
  • Returns boolean

reload

  • reload(): void
  • Returns void

setSchema

  • setSchema(schema: Schema): void
  • Parameters

    Returns void

update

  • update(object: any): JQueryDeferred<T>
  • Parameters

    • object: any

    Returns JQueryDeferred<T>