# Class: MemoryRepository

## Repository~ MemoryRepository

Stores all of its data in local memory as JSON. Does not persist anything to permanent storage. See subclasses for implementations that do persist data to permanent storage.

#### new MemoryRepository()

  Source:
    Repository/Memory.js

### Extends

- Repository

### Members

#### load

  Loads data into the Repository. This loads *all* data, not just the data for a single page.
  Source:
    Repository/Memory.js

#### _loadFromStorage

  Helper for load. Gets initial data from storage medium. This is mainly used for subclasses of MemoryRepository.
  Source:
    Repository/Memory.js

#### deleteAll

  Deletes all entities in repository
  Source:
    Repository/Memory.js

#### getById

  Get an entity directly from its id.
  Source:
    Repository/Memory.js

#### getAll

  Get an array of all active Entities, with sorting and filtering applied.
  Source:
    Repository/Memory.js

#### getGrandTotal

  Gets the total number of Entities in the storage medium, before any sorting or filtering is applied.
  Source:
    Repository/Memory.js

#### _getActiveEntities

  Gets the "active" Entities in the store. If filtering is applied, this is the number of items that have passed the filter. If sorting is applied, this is the number of sorted items. Otherwise, this is equal to the
  Source:
    Repository/Memory.js

### Methods

#### reload()

  Override base Repository, because we don't need to reload, but rather _recalculate. Tells the Repository to reload its data from the storage medium, using previous settings
  Source:
    Repository/Memory.js

#### isInRepository()

  Detects if entity is in the storage medium.
  Source:
    Repository/Memory.js

  ##### Returns:

  isInRepository
  Type
    boolean

#### Search results