|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vrspace.neurogrid.DBAdapter
Database adapter. Some methods common for all subclasses should be implemented here.
Field Summary | |
protected static DBAdapter |
instance
|
Constructor Summary | |
DBAdapter()
|
Method Summary | |
abstract int |
count(java.lang.Class what)
Count instances of a class |
abstract void |
delete(NGObject obj)
Guess what;) |
abstract NGObject |
get(java.lang.Class what,
long id)
Reload an object from the storage |
abstract NGObject |
get(java.lang.Class what,
NGObject value)
The same as subSet( What, value, value.next ); |
static DBAdapter |
getInstance()
Get the instance of current database adapter |
abstract void |
init(Store store)
Initialize the adapter |
abstract java.util.Iterator |
iterator(java.lang.Class what)
Returns iterator on all instances of a class |
abstract void |
put(NGObject obj)
Store an object to the database |
abstract long |
size()
Total number of rows in the database |
abstract java.util.SortedSet |
subSet(java.lang.Class what,
java.lang.Object start,
java.lang.Object end)
Return subset of a class |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static DBAdapter instance
Constructor Detail |
public DBAdapter()
Method Detail |
public abstract void init(Store store) throws java.lang.Exception
java.lang.Exception
Store
public static DBAdapter getInstance()
public abstract void put(NGObject obj) throws java.lang.Exception
java.lang.Exception
public abstract int count(java.lang.Class what)
public abstract java.util.Iterator iterator(java.lang.Class what)
public abstract java.util.SortedSet subSet(java.lang.Class what, java.lang.Object start, java.lang.Object end)
public abstract NGObject get(java.lang.Class what, long id)
public abstract NGObject get(java.lang.Class what, NGObject value)
public abstract void delete(NGObject obj) throws java.lang.Exception
java.lang.Exception
public abstract long size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |