| Constructor and Description |
|---|
MemoryStorage(IdGenerator idGenerator) |
| Modifier and Type | Method and Description |
|---|---|
StoreType |
getType()
Returns the type of the underlying 'store implementation'
|
boolean |
isEmpty()
Checks if the storage system contains no stored elements.
|
T |
read(Serializable id)
Reads a specific object/record from the underlying storage system.
|
Collection<T> |
readAll()
Reads all the data from the underlying storage system.
|
List<T> |
readWithFilter(ReadFilter filter)
Search for objects/records from the underlying storage system.
|
void |
remove(Serializable id)
Removes a specific object/record from the underlying storage system.
|
void |
reset()
Resets the entire storage system.
|
void |
save(T item)
Saves the given object in the underlying storage system.
|
public MemoryStorage(IdGenerator idGenerator)
public StoreType getType()
public Collection<T> readAll()
public T read(Serializable id)
public void save(T item)
Storepublic void reset()
public void remove(Serializable id)
public boolean isEmpty()
public List<T> readWithFilter(ReadFilter filter)
readWithFilter in interface Store<T>filter - a filter to use to fetch an objectIllegalArgumentException - if filter.query has nested objectsCopyright © 2013 JBoss by Red Hat. All Rights Reserved.