|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Observable
org.vrspace.server.VRObject
org.vrspace.server.DBObject
DBObject defines methodes for database storage. When processing a request, sets the field value and stores itself into database, if one is specified.
Field Summary | |
protected DB |
db
|
Fields inherited from class org.vrspace.server.VRObject |
db_id, primitiveMap, primitives |
Constructor Summary | |
DBObject()
|
|
DBObject(DB db)
This constructor implies autocommit, that is, sendEvent will immediately store changed object into the database. |
Method Summary | |
void |
delete(DB db)
Deletes itself from the database. |
java.lang.Object |
get(DB db,
long id)
Fetches the object having db_id = id from the database db |
protected void |
put()
store this into the database |
void |
put(DB db)
Stores (insert/update) the object into database db |
void |
sendEvent(Request r)
Forwards request r to other clients, listeners added by Dispatcher. |
Methods inherited from class org.vrspace.server.VRObject |
arrayToString, canRead, canWrite, clone, equals, fieldToText, fromString, fromText, getClassName, getField, getFields, getId, getID, getMemebers, hasField, hasMethod, isNew, newInstance, sendResponse, setField, setField, setField, setFields, setFields, setValue, stringToArray, toString, toText, toText, toText |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected DB db
Constructor Detail |
public DBObject()
public DBObject(DB db)
Method Detail |
public void put(DB db) throws java.lang.Exception
java.lang.Exception
protected void put()
public java.lang.Object get(DB db, long id) throws java.lang.Exception
java.lang.Exception
public void delete(DB db) throws java.lang.Exception
java.lang.Exception
public void sendEvent(Request r) throws RequestException
sendEvent
in class VRObject
RequestException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |