|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface of all persistent capable objects
Method Summary | |
void |
assignOid(Storage storage,
int oid,
boolean raw)
Assign OID to the object. |
void |
deallocate()
Deallocate persistent object from the database |
int |
getOid()
Get object identifier (OID) |
Storage |
getStorage()
Get storage in which this object is stored |
void |
invalidate()
Invalidate object. |
boolean |
isDeleted()
Check if object is deleted by Java GC from process memory |
boolean |
isModified()
Check if object was modified within current transaction |
boolean |
isPersistent()
Check if object is persistent |
boolean |
isRaw()
Check if object is stub and has to be loaded from the database |
void |
load()
Load object from the database (if needed) |
void |
loadAndModify()
Load object from the database (if needed) and mark it as modified |
void |
makePersistent(Storage storage)
Explicitely make object peristent. |
void |
modify()
Mark object as modified. |
void |
onLoad()
Method called by the database after loading of the object. |
void |
onStore()
Method called by the database before storing of the object. |
boolean |
recursiveLoading()
Specified whether object should be automatically loaded when it is referenced by other loaded peristent object. |
void |
store()
Save object in the database |
Methods inherited from interface java.io.Externalizable |
readExternal, writeExternal |
Method Detail |
public void assignOid(Storage storage, int oid, boolean raw)
storage
- associated storageoid
- object identifierpublic void deallocate()
public int getOid()
public Storage getStorage()
public void invalidate()
public boolean isDeleted()
true
if object is deleted by GCpublic boolean isModified()
true
if object is persistent and was modified within current transactionpublic boolean isPersistent()
true
if object has assigned OIDpublic boolean isRaw()
true
if object has to be loaded from the databasepublic void load()
public void loadAndModify()
public void makePersistent(Storage storage)
storage
- storage in which object should be storedpublic void modify()
public void onLoad()
public void onStore()
public boolean recursiveLoading()
true
making all cluster of referenced objects loaded together.
To avoid main memory overflow you should stop recursive loading of all objects
from the database to main memory by redefining this method in some classes and returing
false
in it. In this case object has to be loaded explicitely
using Persistent.load method.
true
if object is automatically loadedpublic void store()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |