Interface: RepositoryInterface<T>
Type Parameters
Type Parameter | Default type |
---|---|
T extends Model | Model |
Methods
create()
create(object): JQueryDeferred<T>
Parameters
Parameter | Type |
---|---|
object | any |
Returns
JQueryDeferred
<T
>
defaultResponseMiddleware()
defaultResponseMiddleware(data, ctx): Record<string, unknown>
Parameters
Parameter | Type |
---|---|
data | unknown |
ctx | MapsvgCtx |
Returns
Record
<string
, unknown
>
delete()
delete(id): JQueryDeferred<void>
Parameters
Parameter | Type |
---|---|
id | string | number |
Returns
JQueryDeferred
<void
>
encodeData()
encodeData(params): object
Parameters
Parameter | Type |
---|---|
params | any |
Returns
object
find()
find(params?): JQueryDeferred<any>
Parameters
Parameter | Type |
---|---|
params ? | Query |
Returns
JQueryDeferred
<any
>
findById()
findById(id): JQueryDeferred<T>
Parameters
Parameter | Type |
---|---|
id | string | number |
Returns
JQueryDeferred
<T
>
getLoaded()
getLoaded(): ArrayIndexed<T>
Returns
ArrayIndexed
<T
>
getLoadedAsArray()
getLoadedAsArray(): ArrayIndexed<T>
Returns
ArrayIndexed
<T
>
getLoadedObject()
getLoadedObject(id): T
Parameters
Parameter | Type |
---|---|
id | string | number |
Returns
T
getSchema()
getSchema(): Schema
Returns
loadDataFromResponse()
loadDataFromResponse(data, ctx): void
Parameters
Parameter | Type |
---|---|
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): void
Parameters
Parameter | Type |
---|---|
schema | Schema |
Returns
void
update()
update(object): JQueryDeferred<T>
Parameters
Parameter | Type |
---|---|
object | any |
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;