Packageorg.restfulx.models
Classpublic class RxModel
InheritanceRxModel Inheritance flash.events.EventDispatcher
SubclassesRxTreeModel

Encapsulates properties common to all model objects and wraps around a few Rx.models.methods to shorten access.



Public Properties
 PropertyDefined by
  attachment : Object
any model can have one attachment, this can be either RxFileRefrence or BinaryAttachment
RxModel
  cloned : Boolean
indicates if this is a clone
RxModel
  dirty : Boolean
can be used to see if this model's properties have been changed
RxModel
  id : String
all models have an id.
RxModel
  partials : Object
indicates which relationships on this model are partially serialized and should be attempted to be linked to current objects in cache
RxModel
  rev : String
some models have a revision number
RxModel
  sync : String
tracks if this model needs to be synchornized
RxModel
  xrev : String
if we have a revision number, it's also a good idea to keep track of the previous one
RxModel
Public Methods
 MethodDefined by
  
RxModel(label:String = "id")
RxModel
  
create(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, recursive:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):void
Wrapper around Rx.models.create
RxModel
  
destroy(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, recursive:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):void
Wrapper around Rx.models.destroy
RxModel
  
reload(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, fetchDependencies:Boolean = true, useLazyMode:Boolean = true, targetServiceId:int = -1, customProcessor:Function = null):void
Wrapper around Rx.models.reload
RxModel
  
show(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, fetchDependencies:Boolean = true, useLazyMode:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):Object
Wrapper around Rx.models.show
RxModel
  
shown():Boolean
Wrapper around Rx.models.shown
RxModel
  
toString():String
Default toString implementation for models
RxModel
  
update(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, recursive:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):void
Wrapper around Rx.models.update
RxModel
Property detail
attachmentproperty
public var attachment:Object

any model can have one attachment, this can be either RxFileRefrence or BinaryAttachment

clonedproperty 
public var cloned:Boolean

indicates if this is a clone

dirtyproperty 
public var dirty:Boolean

can be used to see if this model's properties have been changed

idproperty 
public var id:String

all models have an id. this is typically unique per class of models

partialsproperty 
public var partials:Object

indicates which relationships on this model are partially serialized and should be attempted to be linked to current objects in cache

revproperty 
public var rev:String

some models have a revision number

syncproperty 
public var sync:String

tracks if this model needs to be synchornized

xrevproperty 
public var xrev:String

if we have a revision number, it's also a good idea to keep track of the previous one

Constructor detail
RxModel()constructor
public function RxModel(label:String = "id")

Parameters
label:String (default = "id") — default model property to use when doing toString().
Method detail
create()method
public function create(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, recursive:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):void

Wrapper around Rx.models.create

Parameters
optsOrOnSuccess:Object (default = null)
 
onFailure:Function (default = null)
 
nestedBy:Array (default = null)
 
metadata:Object (default = null)
 
recursive:Boolean (default = false)
 
targetServiceId:int (default = -1)
 
customProcessor:Function (default = null)

See also

destroy()method 
public function destroy(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, recursive:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):void

Wrapper around Rx.models.destroy

Parameters
optsOrOnSuccess:Object (default = null)
 
onFailure:Function (default = null)
 
nestedBy:Array (default = null)
 
metadata:Object (default = null)
 
recursive:Boolean (default = false)
 
targetServiceId:int (default = -1)
 
customProcessor:Function (default = null)

See also

org.restfulx.controllers.RxModelsController.destroy
reload()method 
public function reload(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, fetchDependencies:Boolean = true, useLazyMode:Boolean = true, targetServiceId:int = -1, customProcessor:Function = null):void

Wrapper around Rx.models.reload

Parameters
optsOrOnSuccess:Object (default = null)
 
onFailure:Function (default = null)
 
nestedBy:Array (default = null)
 
metadata:Object (default = null)
 
fetchDependencies:Boolean (default = true)
 
useLazyMode:Boolean (default = true)
 
targetServiceId:int (default = -1)
 
customProcessor:Function (default = null)

See also

show()method 
public function show(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, fetchDependencies:Boolean = true, useLazyMode:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):Object

Wrapper around Rx.models.show

Parameters
optsOrOnSuccess:Object (default = null)
 
onFailure:Function (default = null)
 
nestedBy:Array (default = null)
 
metadata:Object (default = null)
 
fetchDependencies:Boolean (default = true)
 
useLazyMode:Boolean (default = false)
 
targetServiceId:int (default = -1)
 
customProcessor:Function (default = null)

Returns
Object

See also

shown()method 
public function shown():Boolean

Wrapper around Rx.models.shown

Returns
Boolean

See also

toString()method 
public override function toString():String

Default toString implementation for models

Returns
String
update()method 
public function update(optsOrOnSuccess:Object = null, onFailure:Function = null, nestedBy:Array = null, metadata:Object = null, recursive:Boolean = false, targetServiceId:int = -1, customProcessor:Function = null):void

Wrapper around Rx.models.update

Parameters
optsOrOnSuccess:Object (default = null)
 
onFailure:Function (default = null)
 
nestedBy:Array (default = null)
 
metadata:Object (default = null)
 
recursive:Boolean (default = false)
 
targetServiceId:int (default = -1)
 
customProcessor:Function (default = null)

See also