Type Parameters

Hierarchy (View Summary)

Constructors

Properties

bind: {
    (eventName: string, callback: EventHandler, context?: any): this;
    (eventMap: EventMap, context?: any): this;
} = Backbone.Events.bind
idGenerator: IDGenerator
listenTo: {
    (object: any, events: string, callback: EventHandler): this;
    (object: any, eventMap: EventMap): this;
} = Backbone.Events.listenTo
listenToOnce: {
    (object: any, events: string, callback: EventHandler): this;
    (object: any, eventMap: EventMap): this;
} = Backbone.Events.listenToOnce
objects: { [key: string]: T }
off: (eventName?: string, callback?: EventHandler, context?: any) => this = Backbone.Events.off
on: {
    (eventName: string, callback: EventHandler, context?: any): this;
    (eventMap: EventMap, context?: any): this;
} = Backbone.Events.on
once: {
    (events: string, callback: EventHandler, context?: any): this;
    (eventMap: EventMap, context?: any): this;
} = Backbone.Events.once
stopListening: (object?: any, events?: string, callback?: EventHandler) => this = Backbone.Events.stopListening
unbind: (eventName?: string, callback?: EventHandler, context?: any) => this = Backbone.Events.unbind

Methods

  • Parameters

    • object: T | T[]

    Returns void

  • Parameters

    Returns void

  • Clears all information kept in the model, optionally including unsaved changes.

    Parameters

    • editingMediator: EditingMediator
    • options: ClearOptions

      uses the following properties

      • keepSelected: boolean
      • keepUnsaved: boolean
      • Optionalsilent?: boolean

    Returns void

  • Returns number

  • Returns all modified objects in the repository according to their state (INSERT, UPDATE, DELETE).

    Returns ModifiedObjects<T>

    the modified objects, by their state

  • Retrieves an array of the objects satisfying a given predicate. If no predicate is given, all objects are returned.

    Parameters

    • Optionalpredicate: (value: T, index: number, array: T[]) => boolean

      a predicate function that receives the object and returns a boolean indicating whether or not this object should be retrieved.

    Returns T[]

    an array of all objects satisfying the predicate.

  • Returns boolean

    if there is at least one modified object in the model.

  • Returns boolean

  • Merges an array of objects into the repository. Objects that are not in the repository or with a newer version are added if there are not marked as changed in the repository. For objects changed in the repository, but received a new version, a conflict resolution policy is applied.

    Parameters

    • mergeObjects: { objects: T[] }

      the new objects to put in the repository.

    • options: { areObjectsInBbox: boolean }

      contains extra flags used to merge the objects

      • areObjectsInBbox: boolean

        true if objects came from bbox response

    Returns void

  • Parameters

    • objectOrObjects: T | T[]

    Returns void

  • Parameters

    • object: T | T[]

    Returns void

  • Parameters

    • active: boolean

    Returns void

  • Parameters

    • object: T | T[]

    Returns void

  • Parameters

    • object: T | T[]

    Returns void

  • Parameters

    • eventName: string
    • ...args: unknown[]

    Returns this