Skip to main content

Interface: RepositoryInterface<T>

Type Parameters

Type ParameterDefault type
T extends ModelModel

Methods

create()

create(object): JQueryDeferred<T>

Parameters

ParameterType
objectany

Returns

JQueryDeferred<T>


defaultResponseMiddleware()

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

Parameters

ParameterType
dataunknown
ctxMapsvgCtx

Returns

Record<string, unknown>


delete()

delete(id): JQueryDeferred<void>

Parameters

ParameterType
idstring | number

Returns

JQueryDeferred<void>


encodeData()

encodeData(params): object

Parameters

ParameterType
paramsany

Returns

object


find()

find(params?): JQueryDeferred<any>

Parameters

ParameterType
params?Query

Returns

JQueryDeferred<any>


findById()

findById(id): JQueryDeferred<T>

Parameters

ParameterType
idstring | number

Returns

JQueryDeferred<T>


getLoaded()

getLoaded(): ArrayIndexed<T>

Returns

ArrayIndexed<T>


getLoadedAsArray()

getLoadedAsArray(): ArrayIndexed<T>

Returns

ArrayIndexed<T>


getLoadedObject()

getLoadedObject(id): T

Parameters

ParameterType
idstring | number

Returns

T


getSchema()

getSchema(): Schema

Returns

Schema


loadDataFromResponse()

loadDataFromResponse(data, ctx): void

Parameters

ParameterType
datastring | Record<string, any>
ctxMapsvgCtx

Returns

void


onFirstPage()

onFirstPage(): boolean

Returns

boolean


onLastPage()

onLastPage(): boolean

Returns

boolean


reload()

reload(): void

Returns

void


setSchema()

setSchema(schema): void

Parameters

ParameterType
schemaSchema

Returns

void


update()

update(object): JQueryDeferred<T>

Parameters

ParameterType
objectany

Returns

JQueryDeferred<T>

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;

schema?

optional schema: Schema;

server

server: Server;