Members
filterBy
Gets the default filter for this proxy, which is empty.
- Source:
Methods
add(object, cls)
Add an object to the collection.
Parameters:
Name | Type | Description |
---|---|---|
object |
Object | The object to add, which must have this json format:
|
cls |
string | Override the class property of the object |
- Source:
addAll(rows, cls)
Add a collections of object.
Parameters:
Name | Type | Description |
---|---|---|
rows |
collect | The collections |
cls |
string | The overriden name of the cls. |
- Source:
clear()
Remove objects from the collection.
- Source:
get(uid) → {Object|null}
Gets an object by uid
Parameters:
Name | Type | Description |
---|---|---|
uid |
int | The given uid |
- Source:
Returns:
If found the object otherwise null
- Type
- Object | null
getAll() → {Object}
Gets all the object in the collection and names and values of the filter
- Source:
Returns:
An object on the format:
{filter:{someName:someValue, ...}, objects:{uid:someValue,...}}
- Type
- Object
has(uid) → {true|false}
Tells whether an object with uid exists or not
Parameters:
Name | Type | Description |
---|---|---|
uid |
int | The given uid |
- Source:
Returns:
True if found otherwise false
- Type
- true | false
isDirty(uid) → {boolean}
Tells if an object by the uid has been modified
Parameters:
Name | Type | Description |
---|---|---|
uid |
int |
- Source:
Returns:
True if found otherwise false
- Type
- boolean
remove(uid)
Remove an object from the collection by uid
Parameters:
Name | Type | Description |
---|---|---|
uid |
int | The uid of the object. |
- Source:
setProperty(name, value)
Sets a property in this or inherited object.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name of the property |
value |
any | The value of the property |
- Source:
setPropertyByElement(element)
Sets a property in this or inherited object. The property and value is fecthed from ElementValue, but if the property in this or inherited object has appended the name ByElement, the property is passed the full element.
Parameters:
Name | Type | Description |
---|---|---|
element |
ElementValue | The property name and value. |
- Source:
size() → {int}
Tells the current size of the collections of object
- Source:
Returns:
The number of objects
- Type
- int