|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface of persistent object storage. This interface declares methods for the object oriented Consus API. This interface is implemented by ConsusConnection and JDBCObjectRelationalAdapter. These methods can be used either with the native Consus database engine or with any other DBMS with a JDBC interface through the object-relational adapter.
Method Summary | |
---|---|
void |
becomeObject(Persistent a,
Persistent b)
Exchange references to the obejcts in the database. |
void |
clearComponents(Persistent obj)
Clear all object fields (to make it possible for GC to collect unused persistent object). |
void |
clearObjectCache()
Throw all objects from the object cache. |
void |
deleteObject(Persistent obj)
Remove object from the database. |
java.lang.Object |
fetchObject(java.sql.ResultSet cursor)
Fetch the current row of the cursor as a Java object. |
java.lang.Object |
getObjectByOid(long oid)
Get object by object identifier. |
int |
getObjectCacheSize()
Poll object cache size |
TableIterator |
getTableIterator(java.lang.String tableName)
Get table iterator. |
boolean |
isInitialized()
Returns true if the database has already been initialized. |
void |
loadComponents(Persistent obj)
Load the components of the object. |
void |
loadObject(Persistent obj)
Load the stub object or reload the object from the database. |
void |
lock()
Lock database in exclusive mode. |
void |
open()
Opens the persistent object storage. |
void |
storeObject(Persistent obj)
Save object in the database. |
void |
updateObject(java.lang.Object obj,
java.sql.ResultSet cursor)
Update the current row of the cursor with the new values passed in the Java object. |
Method Detail |
---|
void becomeObject(Persistent a, Persistent b) throws java.lang.Exception
a
- object which OID will be exchanged with b
objectb
- object which OID will be exchanged with a
object
java.lang.Exception
void clearComponents(Persistent obj) throws java.lang.Exception
obj
- persitent object which components are cleared
java.lang.Exception
void clearObjectCache()
getObjectCacheSize
or getUsedMemorySize
method) and
if it axceeds some threshold,
call clearObjectCache
method to remove all objects from cache.
Alternativly, progrtammer can call Persistent.unget
method to replace
object with a stub, but this approach is less efficient because usually it throws
away most recently used object.
void deleteObject(Persistent obj) throws java.lang.Exception
obj
- deleted persitent object
java.lang.Exception
java.lang.Object fetchObject(java.sql.ResultSet cursor) throws java.lang.Exception
cursor
- - result set with the current position corresponding to the fetched object
java.lang.Exception
java.lang.Object getObjectByOid(long oid) throws java.lang.Exception
oid
- - identifier of object to be fetched
java.lang.Exception
int getObjectCacheSize()
TableIterator getTableIterator(java.lang.String tableName) throws java.lang.Exception
tableName
- name of th table through which iteration will be performed
java.lang.Exception
boolean isInitialized() throws java.lang.Exception
true
if database was already initialized, false
otherwise
java.lang.Exception
void loadComponents(Persistent obj) throws java.lang.Exception
obj
- persistent object which components are loaded
java.lang.Exception
void loadObject(Persistent obj) throws java.lang.Exception
obj
- loaded persistent object
java.lang.Exception
void lock() throws java.lang.Exception
java.lang.Exception
void open() throws java.lang.Exception
java.lang.Exception
void storeObject(Persistent obj) throws java.lang.Exception
obj
- stored persitent object
java.lang.Exception
void updateObject(java.lang.Object obj, java.sql.ResultSet cursor) throws java.lang.Exception
obj
- - object with the new valuescursor
- - result set with the current position pointing to the updated row
java.lang.Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |