Packageorg.restfulx.collections
Classpublic class ModelsCollection
InheritanceModelsCollection Inheritance RxCollection Inheritance mx.collections.ArrayCollection
Implementsflash.utils.IExternalizable



Public Properties
 PropertyDefined by
 InheritedfilterFunctions : Array
RxCollection
  itemType : String
Fully Qualified Name (fqn) of the class instances that this array contains.
ModelsCollection
  metadata : Object
A service provider implementation can tag some metadata along with the serialized response that will be shared in metadata variable
ModelsCollection
Public Methods
 MethodDefined by
  
ModelsCollection(source:Array = null)
ModelsCollection
  
getItem(object:Object):Object
Gets a model item reference.
ModelsCollection
  
hasItem(object:Object):Boolean
Checks to see if a given model object is in the collection.
ModelsCollection
  
indexOfId(id:String):int
Find index of the first item with a given id.
ModelsCollection
 Inherited
indexOfPropertyValue(propertyName:String, propertyValue:Object):int
Find index of the first item with a given property name/ value pair.
RxCollection
 Inherited
itemsWithPropertyValue(propertyName:String, propertyValue:Object):RxCollection
Returns a RxCollection of llobjects in the collection that have specified property key and value
RxCollection
  
removeItem(object:Object):void
Removes given model instance (search done by id).
ModelsCollection
  
setItem(object:Object):void
Sets a model item/ updates current reference if any
ModelsCollection
  
withId(id:String):Object
Looks up a model object in the collection by it's id.
ModelsCollection
 Inherited
withPropertyValue(propertyName:String, propertyValue:Object):Object
Attempts to find irstobject in the collection that has specified property key and value
RxCollection
Property detail
itemTypeproperty
public var itemType:String

Fully Qualified Name (fqn) of the class instances that this array contains.

This property can be used as the source for data binding.

metadataproperty 
public var metadata:Object

A service provider implementation can tag some metadata along with the serialized response that will be shared in metadata variable

Constructor detail
ModelsCollection()constructor
public function ModelsCollection(source:Array = null)

Parameters
source:Array (default = null)

See also

mx.collections.ArrayCollection
Method detail
getItem()method
public function getItem(object:Object):Object

Gets a model item reference. Search is performed by model id.

Parameters
object:Object — object to find

Returns
Object — object with the same id
hasItem()method 
public function hasItem(object:Object):Boolean

Checks to see if a given model object is in the collection. Comparison done by id.

Parameters
object:Object — model object

Returns
Boolean — boolean result
indexOfId()method 
public function indexOfId(id:String):int

Find index of the first item with a given id.

Parameters
id:String — of the model to find

Returns
int — index offset
removeItem()method 
public function removeItem(object:Object):void

Removes given model instance (search done by id).

Parameters
object:Object — object to remove
setItem()method 
public function setItem(object:Object):void

Sets a model item/ updates current reference if any

Parameters
object:Object — object to add
withId()method 
public function withId(id:String):Object

Looks up a model object in the collection by it's id. IDs are guaranteed to be unique in a collection.

Parameters
id:String — id of the model

Returns
Object — model object with a given id