Package | org.restfulx.collections |
Class | public class ModelsCollection |
Inheritance | ModelsCollection RxCollection mx.collections.ArrayCollection |
Implements | flash.utils.IExternalizable |
Property | Defined by | ||
---|---|---|---|
filterFunctions : 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 |
Method | Defined 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 | ||
indexOfPropertyValue(propertyName:String, propertyValue:Object):int
Find index of the first item with a given property name/ value pair.
| RxCollection | ||
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 | ||
withPropertyValue(propertyName:String, propertyValue:Object):Object
Attempts to find irstobject in the collection that has specified property key
and value
| RxCollection |
itemType | property |
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.
metadata | property |
public var metadata:Object
A service provider implementation can tag some metadata along with the serialized response that will be shared in metadata variable
ModelsCollection | () | constructor |
public function ModelsCollection(source:Array = null)
Parameters
source:Array (default = null )
|
See also
getItem | () | method |
public function getItem(object:Object):Object
Gets a model item reference. Search is performed by model id.
Parametersobject:Object — object to find
|
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.
Parametersobject:Object — model object
|
Boolean — boolean result
|
indexOfId | () | method |
public function indexOfId(id:String):int
Find index of the first item with a given id.
Parametersid:String — of the model to find
|
int — index offset
|
removeItem | () | method |
public function removeItem(object:Object):void
Removes given model instance (search done by id).
Parametersobject:Object — object to remove
|
setItem | () | method |
public function setItem(object:Object):void
Sets a model item/ updates current reference if any
Parametersobject: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.
Parametersid:String — id of the model
|
Object — model object with a given id
|