Constructor Detail
bbq.domain.Repository(options, type)
| Name | Type | Comment |
|---|---|---|
| options | {Object} | |
| type | {Object} | The type of object - should be a child class of bbq.domain.Entity |
| options.entities Optional |
{Array} | Entities to pre-populate with |
Defined in: Repository.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
bbq.domain.Repository(options, type)
Holds domain objects.
|
| Method Attributes | Method Name and Description |
|---|---|
|
add(entity)
Adds an Entity to this repository.
|
|
|
empty()
removes all elements
|
|
|
get(index)
|
|
|
getAll()
|
|
|
indexOf(entity)
|
|
|
put(entity, index)
|
|
|
remove(An)
Removes the passed entity
|
|
|
size()
|
| Name | Type | Comment |
|---|---|---|
| options | {Object} | |
| type | {Object} | The type of object - should be a child class of bbq.domain.Entity |
| options.entities Optional |
{Array} | Entities to pre-populate with |
| Name | Type | Comment |
|---|---|---|
| entity | {Object} |
| Name | Type | Comment |
|---|---|---|
| index | {Number} |
| Name | Type | Comment |
|---|---|---|
| entity | {Object} | An object or a id |
| Name | Type | Comment |
|---|---|---|
| entity | {Object} | |
| index | {Number} |
| Name | Type | Comment |
|---|---|---|
| An | {Object} | entity of the same type contained in this list, data object or an id |