org.cruxframework.crux.core.client.db
Class AbstractObjectStore<K,V>

java.lang.Object
  extended by org.cruxframework.crux.core.client.db.DBObject
      extended by org.cruxframework.crux.core.client.db.AbstractObjectStore<K,V>
All Implemented Interfaces:
ObjectStore<K,V>
Direct Known Subclasses:
IDXAbstractObjectStore, WSQLAbstractObjectStore

public abstract class AbstractObjectStore<K,V>
extends DBObject
implements ObjectStore<K,V>

CRUX INTERNAL CLASS. DO NOT USE IT DIRECTLY.

Base class for object stores on Crux Database. Use the interface ObjectStore to access your stores.

Author:
Thiago da Rosa de Bustamante

Field Summary
 
Fields inherited from class org.cruxframework.crux.core.client.db.DBObject
db, logger
 
Constructor Summary
protected AbstractObjectStore(AbstractDatabase db)
           
 
Method Summary
 void add(V object)
          Insert the given object into the store.
 void delete(K key)
          Remove the object associated with the given key from the store.
 void delete(KeyRange<K> keyRange)
          Remove all the objects in the given range from the store.
 void put(V object)
          Update the given object into the storage.
 
Methods inherited from class org.cruxframework.crux.core.client.db.DBObject
reportError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.cruxframework.crux.core.client.db.ObjectStore
add, clear, count, count, delete, delete, get, getIndex, getIndexNames, getKeyRangeFactory, getObjectStoreName, isAutoIncrement, openCursor, openCursor, openCursor, put
 

Constructor Detail

AbstractObjectStore

protected AbstractObjectStore(AbstractDatabase db)
Method Detail

put

public void put(V object)
Description copied from interface: ObjectStore
Update the given object into the storage. If it does not exists, insert it.

Specified by:
put in interface ObjectStore<K,V>

add

public void add(V object)
Description copied from interface: ObjectStore
Insert the given object into the store.

Specified by:
add in interface ObjectStore<K,V>

delete

public void delete(K key)
Description copied from interface: ObjectStore
Remove the object associated with the given key from the store.

Specified by:
delete in interface ObjectStore<K,V>

delete

public void delete(KeyRange<K> keyRange)
Description copied from interface: ObjectStore
Remove all the objects in the given range from the store.

Specified by:
delete in interface ObjectStore<K,V>


Copyright © 2014. All rights reserved.