|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Manager responsible for storage operations with storable objects.
Storable
Method Summary | |
void |
addStatusListener(StatusListener listener)
Starts sending status events to a listener. |
void |
addStorageListener(StorageListener listener)
Starts sending storage events to a listener. |
void |
batchStore(java.util.Collection objs,
boolean deep)
Stores a collection of objects in one only "batch" operation. |
OID |
createOID(java.lang.Object obj)
Creates an OID from an object. |
void |
delete(java.lang.Object obj)
Deletes an object. |
void |
delete(OID oid)
Deletes an object. |
int |
delete(Parameters params)
Deletes objects according to parameters. |
ManagerInfo |
getManagerInfo()
Gets storage management information. |
OID |
getOID(java.lang.Object obj)
Returns OID of a transient storable object. |
Status |
getStatus()
Gets manager's status. |
Transaction |
getTransaction()
Gets the transaction associated to the current thread. |
void |
invalidateCache()
Invalidates manager's cache. |
boolean |
isRemote()
Indicates if manager is running on another JVM. |
void |
removeStatusListener(StatusListener listener)
Stops sending status events to a listener. |
void |
removeStorageListener(StorageListener listener)
Stops sending storage events to a listener. |
java.lang.Object |
retrieve(OID oid)
Retrieves an object. |
java.lang.Object |
retrieve(OID oid,
boolean summary)
Retrieves an object. |
java.lang.Object |
retrieve(OID oid,
boolean summary,
boolean lazy)
Retrieves an object. |
void |
start(StorageController aController)
Starts the manager. |
void |
stop()
Stops the manager. |
OID |
store(java.lang.Object obj)
Stores an object and referenced objects. |
OID |
store(java.lang.Object obj,
boolean deep)
Stores an object. |
void |
unlinkTransientObjects()
Unlinks transient storable objects from stored ones. |
Methods inherited from interface net.sf.jso.query.QueryProcessor |
count, countPages, retrieve |
Methods inherited from interface net.sf.jso.StatusListener |
statusChanged |
Methods inherited from interface net.sf.jso.storage.StorageListener |
objectDeleted, objectStored |
Methods inherited from interface net.sf.jso.schema.SchemaListener |
classAltered, classDropped, subclassCreated, subclassDropped |
Method Detail |
public void start(StorageController aController) throws StorageException
aController
- Application's controller.
StorageException
public void stop() throws StorageException
StorageException
public Status getStatus()
public boolean isRemote()
true
if manager is running on another JVM;
false
otherwise.public void invalidateCache()
public ManagerInfo getManagerInfo()
public Transaction getTransaction() throws StorageException
StorageException
public OID createOID(java.lang.Object obj)
obj
- An OID representation. Usually a String
or
Number
object.public OID getOID(java.lang.Object obj) throws StorageException
obj
- The object to be identified.
StorageException
public void unlinkTransientObjects()
public OID store(java.lang.Object obj) throws StorageException, ObjectNotFoundException, DuplicateObjectException
obj
- The object to be stored.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- When trying to update an unexistent object.
DuplicateObjectException
- When trying to store an object that violates
unique key constraints.public OID store(java.lang.Object obj, boolean deep) throws StorageException, ObjectNotFoundException, DuplicateObjectException
obj
- The object to be stored.deep
- Indicates if referenced objects should also be stored.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- When trying to update an unexistent object.
DuplicateObjectException
- When trying to store an object that violates
unique key constraints.public void batchStore(java.util.Collection objs, boolean deep) throws StorageException, ObjectNotFoundException, DuplicateObjectException
objs
- The collection of object to be stored.deep
- Indicates if referenced objects should also be stored.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- When trying to update an unexistent object.
DuplicateObjectException
- When trying to store an object that violates
unique key constraints.public java.lang.Object retrieve(OID oid) throws StorageException, ObjectNotFoundException
oid
- The identification of object to be stored.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- If no object can be found by the supplied
OID.public java.lang.Object retrieve(OID oid, boolean summary) throws StorageException, ObjectNotFoundException
oid
- The identification of object to be stored.summary
- Indicates if only summary fields should be retrieved.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- If no object can be found by the supplied
OID.public java.lang.Object retrieve(OID oid, boolean summary, boolean lazy) throws StorageException, ObjectNotFoundException
oid
- The identification of object to be stored.summary
- Indicates if only summary fields should be retrieved.lazy
- Indicates if referenced objects should be lazy loaded.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- If no object can be found by the supplied
OID.public void delete(java.lang.Object obj) throws StorageException, ObjectNotFoundException, IntegrityException
obj
- The object to be deleted.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- When trying to delete an unexistent object.
IntegrityException
- When deleting an object violates referential
integrity constraints.public void delete(OID oid) throws StorageException, ObjectNotFoundException, IntegrityException
oid
- The identification of object to be deleted.
StorageException
- If any storage operation fails.
ObjectNotFoundException
- When trying to delete an unexistent object.
IntegrityException
- When deleting an object violates referential
integrity constraints.public int delete(Parameters params) throws StorageException
params
- Parameters to be used.
StorageException
- If any storage operation fails.public void addStatusListener(StatusListener listener)
listener
- Listener to receive status events.public void removeStatusListener(StatusListener listener)
listener
- Listener to stop receiving status events.public void addStorageListener(StorageListener listener)
listener
- Listener to receive storage events.public void removeStorageListener(StorageListener listener)
listener
- Listener to stop receiving storage events.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |