|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ObjectContainer
database engine interface.
The ObjectContainer
interface provides all methods
to store, retrieve and delete objects and to change object state.
Method Summary | ||
---|---|---|
void |
activate(java.lang.Object obj,
int depth)
Activates all members on a stored object to the specified depth. |
|
boolean |
close()
closes the ObjectContainer . |
|
void |
commit()
Commits the running transaction. |
|
void |
deactivate(java.lang.Object obj,
int depth)
deactivates a stored object by setting all members to NULL . |
|
void |
delete(java.lang.Object obj)
deletes a stored object permanently. |
|
|
get(java.lang.Object template)
Query-By-Example interface to retrieve objects. |
|
Query |
query()
creates a new S.O.D.A. |
|
|
query(java.lang.Class<Type> clazz)
queries for all instances of a class. |
|
void |
rollback()
rolls back the running transaction. |
|
void |
set(java.lang.Object obj)
Newly stores objects or updates stored objects. |
|
void |
set(java.lang.Object obj,
int depth)
Newly stores objects or updates stored objects. |
Method Detail |
---|
void activate(java.lang.Object obj, int depth) throws java.io.IOException
java.io.IOException
boolean close() throws java.io.IOException
ObjectContainer
.
close()
automatically performs a
commit()
.
while(!close()){}
to close all sessions using this container.
java.io.IOException
void commit() throws java.io.IOException
java.io.IOException
void deactivate(java.lang.Object obj, int depth)
NULL
.
ObjectContainer
obj
- the object to be deactivated.depth
- the member
to which deactivate is to cascade.void delete(java.lang.Object obj) throws java.io.IOException
ObjectContainer
.
which can be also used for cascaded deletes.
obj
- the object to be deleted from the
ObjectContainer
.java.io.IOException
<T> ObjectSet<T> get(java.lang.Object template) throws java.io.IOException, IllegalClassTypeException
get()
creates an
ObjectSet
containing
all objects in the ObjectContainer
that match the passed
template object.get(NULL)
returns all objects stored in the
ObjectContainer
.ObjectSet
are instantiated
and activated to the preconfigured depth. The
activation depth
may be configured globally via com.mobixess.jodb.core.JODBConfig#setDefaultActivationDepth()
.
template
- object to be used as an example to find all matching objects.ObjectSet
containing all found objects.java.io.IOException
IllegalClassTypeException
Query query()
Query
.
get(Object template)
for simple Query-By-Example.
<Type> ObjectSet<Type> query(java.lang.Class<Type> clazz) throws java.io.IOException, IllegalClassTypeException
clazz
- the class to query for.
ObjectSet
returned by the query.
java.io.IOException
IllegalClassTypeException
void rollback()
deactivate()
and activate()
to reload an objects member values.
void set(java.lang.Object obj) throws IllegalClassTypeException, java.io.IOException
ObjectContainer
will be
stored when it is passed to set()
. An object already stored
in the ObjectContainer
will be updated.
obj
- the object to be stored or updated.
java.io.IOException
{@link
- IllegalClassTypeException}
IllegalClassTypeException
void set(java.lang.Object obj, int depth) throws IllegalClassTypeException, java.io.IOException
ObjectContainer
will be
stored when it is passed to set()
. An object already stored
in the ObjectContainer
will be updated.
obj
- the object to be stored or updated.depth
- the depth to which the object is to be updated
IllegalClassTypeException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |