Interface IRecord

Hierarchy

Index

Properties

Methods

Properties

optional public alias?: Array<string>

[Config Option] (String[])

optional public alternateClassName?: any

[Config Option] (String/String[])

optional public associations?: Array<any>

[Config Option] (Object[])

optional public belongsTo?: any

[Config Option] (String/Object/String[]/Object[])

optional public bubbleEvents?: any

[Config Option] (String/String[])

optional public clientIdProperty?: string

[Config Option] (String)

optional public config?: any

[Config Option] (Object)

optional public dirty?: boolean

[Property] (Boolean)

optional public editing?: boolean

[Property] (Boolean)

optional public extend?: string

[Config Option] (String)

optional public fields?: any

[Config Option] (Object[]/String[])

optional public hasMany?: any

[Config Option] (String/Object/String[]/Object[])

optional public hasOne?: any

[Config Option] (String/Object/String[]/Object[])

optional public idProperty?: string

[Config Option] (String)

optional public identifier?: any

[Config Option] (Object/String)

optional public inheritableStatics?: any

[Config Option] (Object)

optional public listeners?: any

[Config Option] (Object)

optional public mixins?: any

[Config Option] (Object)

optional public modified?: any

[Property] (Object)

optional public phantom?: boolean

[Property] (Boolean)

optional public platformConfig?: any

[Config Option] (Object)

optional public proxy?: any

[Config Option] (Object/Ext.data.Proxy)

optional public raw?: any

[Property] (Object)

optional public self?: IClass

[Property] (Ext.Class)

optional public singleton?: boolean

[Config Option] (Boolean)

optional public statics?: any

[Config Option] (Object)

optional public stores?: Array<any>

[Property] (Array)

optional public useCache?: boolean

[Config Option] (Boolean)

optional public uses?: Array<string>

[Config Option] (String[])

optional public validations?: Array<any>

[Config Option] (Object[])

Methods

optional public addAfterListener(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Appends an after event handler

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event to listen for.

  • fn?: any optional

    Function/String The method the event invokes.

  • scope?: any optional

    Object The scope for fn.

  • options?: any optional

    Object An object containing handler configuration.

optional public addBeforeListener(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Appends a before event handler

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event to listen for.

  • fn?: any optional

    Function/String The method the event invokes.

  • scope?: any optional

    Object The scope for fn.

  • options?: any optional

    Object An object containing handler configuration.

optional public addEvents(eventNames?: any)

[Method] Adds the specified events to the list of events which this Observable may fire

Parameters

  • eventNames?: any optional

    Object/String... Either an object with event names as properties with a value of true or the first event name string if multiple event names are being passed as separate parameters.

optional public addListener(eventName?: any, fn?: any, scope?: any, options?: any, order?: string)

[Method] Appends an event handler to this object

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event to listen for. May also be an object who's property names are event names.

  • fn?: any optional

    Function/String The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.

  • scope?: any optional

    Object The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.

  • options?: any optional

    Object An object containing handler configuration. This object may contain any of the following properties:

  • order?: string optional

    String The order of when the listener should be added into the listener queue. Possible values are before, current and after.

optional public addManagedListener(object?: any, eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Adds listeners to any Observable object or Element which are automatically removed when this Component is destroyed

Parameters

  • object?: any optional

    Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.

  • eventName?: any optional

    Object/String The event name, or an object containing event name properties.

  • fn?: any optional

    Function If the eventName parameter was an event name, this is the handler function.

  • scope?: any optional

    Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.

  • options?: any optional

    Object If the eventName parameter was an event name, this is the addListener options.

optional public beginEdit()

[Method] Begins an edit

optional public callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

optional public callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

optional public callOverridden(args?: any): any

[Method] Call the original method that was previously overridden with override This method is deprecated as callParent does

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callOverridden(arguments)

Returns

any

Object Returns the result of calling the overridden method

optional public callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

optional public callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

optional public callParent(args?: any): any

[Method] Call the parent method of the current method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callParent(arguments)

Returns

any

Object Returns the result of calling the parent method

optional public callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

optional public callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

optional public callSuper(args?: any): any

[Method] This method is used by an override to call the superclass method but bypass any overridden method

Parameters

  • args?: any optional

    Array/Arguments The arguments, either an array or the arguments object from the current method, for example: this.callSuper(arguments)

Returns

any

Object Returns the result of calling the superclass method

optional public cancelEdit()

[Method] Cancels all changes made in the current edit operation

optional public clearListeners()

[Method] Removes all listeners for this object

optional public commit(silent?: boolean)

[Method] Usually called by the Ext data Store which owns the model instance

Parameters

  • silent?: boolean optional

    Boolean true to skip notification of the owning store of the change.

optional public copy(id?: string): IModel

[Method] Creates a copy clone of this Model instance

Parameters

  • id?: string optional

    String A new id. If you don't specify this a new id will be generated for you. To generate a phantom instance with a new id use: var rec = record.copy(); // clone the record with a new id

Returns

IModel

Ext.data.Model

optional public destroy()

[Method] Destroys this model instance

optional public enableBubble(events?: any)

[Method] Enables events fired by this Observable to bubble up an owner hierarchy by calling this getBubbleTarget if present

Parameters

  • events?: any optional

    String/String[] The event name to bubble, or an Array of event names.

optional public endEdit(silent?: boolean, modifiedFieldNames?: Array<string>)

[Method] Ends an edit

Parameters

  • silent?: boolean optional

    Boolean true to not notify the store of the change.

  • modifiedFieldNames?: Array<string> optional

    String[] Array of field names changed during edit.

optional public erase(options?: any, scope?: any): IModel

[Method] Destroys the record using the configured proxy

Parameters

  • options?: any optional

    Object/Function Options to pass to the proxy. Config object for Ext.data.Operation. If you pass a function, this will automatically become the callback method. For convenience the config object may also contain success and failure methods in addition to callback - they will all be invoked with the Model and Operation as arguments.

  • scope?: any optional

    Object The scope to run your callback method in. This is only used if you passed a function as the first argument.

Returns

IModel

Ext.data.Model The Model instance.

optional public fireAction(eventName?: string, args?: Array<any>, fn?: any, scope?: any): any

[Method] Fires the specified event with the passed parameters and execute a function action at the end if there are no liste

Parameters

  • eventName?: string optional

    String The name of the event to fire.

  • args?: Array<any> optional

    Array Arguments to pass to handers.

  • fn?: any optional

    Function Action.

  • scope?: any optional

    Object Scope of fn.

Returns

any

Object

optional public fireEvent(eventName: string, args?: Array<any>): boolean

[Method] Fires the specified event with the passed parameters minus the event name plus the options object passed to addList

Parameters

  • eventName: string

    String The name of the event to fire.

  • args?: Array<any> optional

    Object... Variable number of parameters are passed to handlers.

Returns

boolean

Boolean Returns false if any of the handlers return false.

optional public get(fieldName?: string): any

[Method] Returns the value of the given field

Parameters

  • fieldName?: string optional

    String The field to fetch the value for.

Returns

any

Object The value.

optional public getAssociatedData(): any

[Method] Gets all of the data from this Models loaded associations

Returns

any

Object The nested data set for the Model's loaded associations.

optional public getAssociations(): Array<any>

[Method] Returns the value of associations

Returns

Array<any>

Object[]

optional public getBelongsTo(): any

[Method] Returns the value of belongsTo

Returns

any

String/Object/String[]/Object[]

optional public getBubbleEvents(): any

[Method] Returns the value of bubbleEvents

Returns

any

String/String[]

optional public getChanges(): any

[Method] Gets a hash of only the fields that have been modified since this Model was created or committed

Returns

any

Object

optional public getClientIdProperty(): string

[Method] Returns the value of clientIdProperty

Returns

string

String

optional public getData(includeAssociated?: boolean): any

[Method] Returns an object containing the data set on this record

Parameters

  • includeAssociated?: boolean optional

    Boolean true to include the associated data.

Returns

any

Object The data.

optional public getFields(): any

[Method] Returns the value of fields

Returns

any

Object[]/String[]

optional public getHasMany(): any

[Method] Returns the value of hasMany

Returns

any

String/Object/String[]/Object[]

optional public getHasOne(): any

[Method] Returns the value of hasOne

Returns

any

String/Object/String[]/Object[]

optional public getId(): any

[Method] Returns the unique ID allocated to this model instance as defined by idProperty

Returns

any

Number/String The id.

optional public getIdProperty(): string

[Method] Returns the value of idProperty

Returns

string

String

optional public getIdentifier(): any

[Method] Returns the value of identifier

Returns

any

Object/String

optional public getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

optional public getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

optional public getInitialConfig(name?: string): any

[Method] Returns the initial configuration passed to constructor

Parameters

  • name?: string optional

    String When supplied, value for particular configuration option is returned, otherwise the full config object is returned.

Returns

any

Object/Mixed

optional public getIsErased()

[Method] Returns true if the record has been erased on the server

optional public getListeners(): any

[Method] Returns the value of listeners

Returns

any

Object

optional public getProxy(): any

[Method] Returns the value of proxy

Returns

any

Object/Ext.data.Proxy

optional public getUseCache(): boolean

[Method] Returns the value of useCache

Returns

boolean

Boolean

optional public getValidations(): Array<any>

[Method] Returns the value of validations

Returns

Array<any>

Object[]

optional public hasListener(eventName?: string): boolean

[Method] Checks to see if this object has any listeners for a specified event

Parameters

  • eventName?: string optional

    String The name of the event to check for

Returns

boolean

Boolean True if the event is being listened for, else false

optional public initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

optional public initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

optional public initConfig(instanceConfig?: any): any

[Method] Initialize configuration for this class

Parameters

  • instanceConfig?: any optional

    Object

Returns

any

Object mixins The mixin prototypes as key - value pairs

optional public isModified(fieldName?: string): boolean

[Method] Returns true if the passed field name has been modified since the load or last commit

Parameters

  • fieldName?: string optional

    String Ext.data.Field.name

Returns

boolean

Boolean

optional public isValid(): boolean

[Method] Checks if the model is valid

Returns

boolean

Boolean true if the model is valid.

optional public join(store?: IStore)

[Method] By joining this model to an instance of a class this model will automatically try to call certain template methods o

Parameters

  • store?: IStore optional

    Ext.data.Store The store to which this model has been added.

optional public mon(object?: any, eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Alias for addManagedListener

Parameters

  • object?: any optional

    Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.

  • eventName?: any optional

    Object/String The event name, or an object containing event name properties.

  • fn?: any optional

    Function If the eventName parameter was an event name, this is the handler function.

  • scope?: any optional

    Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.

  • options?: any optional

    Object If the eventName parameter was an event name, this is the addListener options.

optional public mun(object?: any, eventName?: any, fn?: any, scope?: any)

[Method] Alias for removeManagedListener

Parameters

  • object?: any optional

    Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.

  • eventName?: any optional

    Object/String The event name, or an object containing event name properties.

  • fn?: any optional

    Function If the eventName parameter was an event name, this is the handler function.

  • scope?: any optional

    Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.

optional public on(eventName?: any, fn?: any, scope?: any, options?: any, order?: string)

[Method] Alias for addListener

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event to listen for. May also be an object who's property names are event names.

  • fn?: any optional

    Function/String The method the event invokes. Will be called with arguments given to fireEvent plus the options parameter described below.

  • scope?: any optional

    Object The scope (this reference) in which the handler function is executed. If omitted, defaults to the object which fired the event.

  • options?: any optional

    Object An object containing handler configuration. This object may contain any of the following properties:

  • order?: string optional

    String The order of when the listener should be added into the listener queue. Possible values are before, current and after.

optional public onAfter(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Alias for addAfterListener

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event to listen for.

  • fn?: any optional

    Function/String The method the event invokes.

  • scope?: any optional

    Object The scope for fn.

  • options?: any optional

    Object An object containing handler configuration.

optional public onBefore(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Alias for addBeforeListener

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event to listen for.

  • fn?: any optional

    Function/String The method the event invokes.

  • scope?: any optional

    Object The scope for fn.

  • options?: any optional

    Object An object containing handler configuration.

optional public reject(silent?: boolean)

[Method] Usually called by the Ext data Store to which this model instance has been joined

Parameters

  • silent?: boolean optional

    Boolean true to skip notification of the owning store of the change.

optional public relayEvents(object?: any, events?: any): IObservable

[Method] Relays selected events from the specified Observable as if the events were fired by this

Parameters

  • object?: any optional

    Object The Observable whose events this object is to relay.

  • events?: any optional

    String/Array/Object Array of event names to relay.

Returns

IObservable

Ext.mixin.Observable this

optional public removeAfterListener(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Removes a before event handler

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event the handler was associated with.

  • fn?: any optional

    Function/String The handler to remove.

  • scope?: any optional

    Object The scope originally specified for fn.

  • options?: any optional

    Object Extra options object.

optional public removeBeforeListener(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Removes a before event handler

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event the handler was associated with.

  • fn?: any optional

    Function/String The handler to remove.

  • scope?: any optional

    Object The scope originally specified for fn.

  • options?: any optional

    Object Extra options object.

optional public removeListener(eventName?: any, fn?: any, scope?: any, options?: any, order?: string)

[Method] Removes an event handler

Parameters

  • eventName?: any optional

    String/String[]/Object The type of event the handler was associated with.

  • fn?: any optional

    Function/String The handler to remove. This must be a reference to the function passed into the addListener call.

  • scope?: any optional

    Object The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to addListener or the listener will not be removed.

  • options?: any optional

    Object Extra options object. See addListener for details.

  • order?: string optional

    String The order of the listener to remove. Possible values are before, current and after.

optional public removeManagedListener(object?: any, eventName?: any, fn?: any, scope?: any)

[Method] Adds listeners to any Observable object or Element which are automatically removed when this Component is destroyed

Parameters

  • object?: any optional

    Ext.mixin.Observable/HTMLElement The item to which to add a listener/listeners.

  • eventName?: any optional

    Object/String The event name, or an object containing event name properties.

  • fn?: any optional

    Function If the eventName parameter was an event name, this is the handler function.

  • scope?: any optional

    Object If the eventName parameter was an event name, this is the scope in which the handler function is executed.

optional public resumeEvents(discardQueuedEvents?: boolean)

[Method] Resumes firing events see suspendEvents

Parameters

  • discardQueuedEvents?: boolean optional

    Boolean Pass as true to discard any queued events.

optional public save(options?: any, scope?: any): IModel

[Method] Saves the model instance using the configured proxy

Parameters

  • options?: any optional

    Object/Function Options to pass to the proxy. Config object for Ext.data.Operation. If you pass a function, this will automatically become the callback method. For convenience the config object may also contain success and failure methods in addition to callback - they will all be invoked with the Model and Operation as arguments.

  • scope?: any optional

    Object The scope to run your callback method in. This is only used if you passed a function as the first argument.

Returns

IModel

Ext.data.Model The Model instance

optional public set(fieldName?: any, value?: any)

[Method] Sets the given field to the given value marks the instance as dirty

Parameters

  • fieldName?: any optional

    String/Object The field to set, or an object containing key/value pairs.

  • value?: any optional

    Object The value to set.

optional public setAssociations(associations?: Array<any>)

[Method] Sets the value of associations

Parameters

  • associations?: Array<any> optional

    Object[] The new value.

optional public setBelongsTo(belongsTo?: any)

[Method] Sets the value of belongsTo

Parameters

  • belongsTo?: any optional

    String/Object/String[]/Object[] The new value.

optional public setBubbleEvents(bubbleEvents?: any)

[Method] Sets the value of bubbleEvents

Parameters

  • bubbleEvents?: any optional

    String/String[] The new value.

optional public setClientIdProperty(clientIdProperty?: string)

[Method] Sets the value of clientIdProperty

Parameters

  • clientIdProperty?: string optional

    String The new value.

optional public setConvertedData(data?: any): IModel

[Method] This sets the data directly without converting and applying default values

Parameters

  • data?: any optional

    Object

Returns

IModel

Ext.data.Model This Record.

optional public setData(rawData?: any): IModel

[Method] This method is used to set the data for this Record instance

Parameters

  • rawData?: any optional

    Object

Returns

IModel

Ext.data.Model This record.

optional public setDirty()

[Method] Marks this Record as dirty

optional public setFields(fields?: Array<any>): any

[Method] Updates the collection of Fields that all instances of this Model use

Parameters

  • fields?: Array<any> optional

    Array

Returns

any

any

optional public setHasMany(hasMany?: any)

[Method] Sets the value of hasMany

Parameters

  • hasMany?: any optional

    String/Object/String[]/Object[] The new value.

optional public setHasOne(hasOne?: any)

[Method] Sets the value of hasOne

Parameters

  • hasOne?: any optional

    String/Object/String[]/Object[] The new value.

optional public setId(id?: any)

[Method] Sets the model instance s id field to the given id

Parameters

  • id?: any optional

    Number/String The new id

optional public setIdProperty(idProperty?: string)

[Method] Sets the value of idProperty

Parameters

  • idProperty?: string optional

    String The new value.

optional public setIdentifier(identifier?: any)

[Method] Sets the value of identifier

Parameters

  • identifier?: any optional

    Object/String The new value.

optional public setListeners(listeners?: any)

[Method] Sets the value of listeners

Parameters

  • listeners?: any optional

    Object The new value.

optional public setProxy(proxy?: any)

[Method] Sets the value of proxy

Parameters

  • proxy?: any optional

    Object/Ext.data.Proxy The new value.

optional public setUseCache(useCache?: boolean)

[Method] Sets the value of useCache

Parameters

  • useCache?: boolean optional

    Boolean The new value.

optional public setValidations(validations?: Array<any>)

[Method] Sets the value of validations

Parameters

  • validations?: Array<any> optional

    Object[] The new value.

optional public suspendEvents()

[Method] Suspends the firing of all events

optional public toUrl(): string

[Method] Returns a url suitable string for this model instance

Returns

string

String The url string for this model instance.

optional public un(eventName?: any, fn?: any, scope?: any, options?: any, order?: string)

[Method] Alias for removeListener

Parameters

  • eventName?: any optional

    String/String[]/Object The type of event the handler was associated with.

  • fn?: any optional

    Function/String The handler to remove. This must be a reference to the function passed into the addListener call.

  • scope?: any optional

    Object The scope originally specified for the handler. It must be the same as the scope argument specified in the original call to addListener or the listener will not be removed.

  • options?: any optional

    Object Extra options object. See addListener for details.

  • order?: string optional

    String The order of the listener to remove. Possible values are before, current and after.

optional public unAfter(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Alias for removeAfterListener

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event the handler was associated with.

  • fn?: any optional

    Function/String The handler to remove.

  • scope?: any optional

    Object The scope originally specified for fn.

  • options?: any optional

    Object Extra options object.

optional public unBefore(eventName?: any, fn?: any, scope?: any, options?: any)

[Method] Alias for removeBeforeListener

Parameters

  • eventName?: any optional

    String/String[]/Object The name of the event the handler was associated with.

  • fn?: any optional

    Function/String The handler to remove.

  • scope?: any optional

    Object The scope originally specified for fn.

  • options?: any optional

    Object Extra options object.

optional public unjoin(store?: IStore)

[Method] This un joins this record from an instance of a class

Parameters

  • store?: IStore optional

    Ext.data.Store The store from which this model has been removed.

optional public validate(): IErrors

[Method] Validates the current data against all of its configured validations

Returns

IErrors

Ext.data.Errors The errors object.