AeroGear Android Library 1.1.0

org.jboss.aerogear.android.datamanager
Interface Store<T>

All Known Implementing Classes:
MemoryStorage, SQLStore

public interface Store<T>

Represents an abstraction layer for a storage system.


Method Summary
 StoreType getType()
          Returns the type of the underlying 'store implementation'
 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.
 

Method Detail

getType

StoreType getType()
Returns the type of the underlying 'store implementation'

Returns:
StoreType

readAll

Collection<T> readAll()
Reads all the data from the underlying storage system.

Returns:
List of T

read

T read(Serializable id)
Reads a specific object/record from the underlying storage system.

Parameters:
id - id from the desired object
Returns:
T

readWithFilter

List<T> readWithFilter(ReadFilter filter)
Search for objects/records from the underlying storage system.

Parameters:
filter - a filter to use to fetch an object
Returns:
List SHOULD NOT BE NULL

save

void save(T item)
Saves the given object in the underlying storage system.

Parameters:
item - Object to save

reset

void reset()
Resets the entire storage system.


remove

void remove(Serializable id)
Removes a specific object/record from the underlying storage system.

Parameters:
id - Id of item to remote

AeroGear Android Library 1.1.0

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.