|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
An Archivist manages persistance for objects by delegating to the correct underlying persistance strategy. It is vastly simpler that either the JDO or Hibernate interfaces and yet for 99% of operations is sufficient.
| Method Summary | |
void |
close()
Closes the PersistanceManager so it an no longer be used. |
void |
delete(Object o)
Delete the supplied object. |
boolean |
exists(Map fields,
String classname)
A fast test to determine if there is an object with values matching field names according to the supplied map. |
boolean |
exists(String namefield,
String name,
String classname)
A fast test to determine if there is an object with the given name, using the supplied namefield and classname as qualifiers of the search. |
void |
flush()
Flushes out the Persistancemanager's connection with the database. |
Transaction |
getTransaction()
Return a Transaction that can be used to wrap atomic operations. |
Object |
load(Map fields,
String classname)
Load an object whose field values match the values keyed against those field names in the supplied Map. |
Object |
load(Object target,
Class clazz)
Load an object according to the target parameter supplied. |
Object |
load(String namefield,
String name,
String classname)
Convenience method to load an object with the given name, using the supplied namefield and classname as qualifiers of the search. |
Object |
save(Object o)
Save the supplied object. |
| Method Detail |
public Object load(String namefield,
String name,
String classname)
throws ArchiveException
namefield:name pair are unique to this
class.
namefield - The name of the property that holds the name to
against.name - The name The actual name we are looking for.classname - The fully qualified class of the object to load.
ArchiveException - if anything went wrong.
public Object load(Map fields,
String classname)
throws ArchiveException
fields - The map of field valeus keyed against the field names
they corrospond with.classname - The fully qualified class of the object to load.
ArchiveException - if anything went wrong.
public Object load(Object target,
Class clazz)
throws ArchiveException
target - The target that informs the archivist as to which object
to load.clazz - The class to load.
ArchiveException - if anything went wrong.
public Object save(Object o)
throws ArchiveException
o - the object to save.
ArchiveException - if anything went wrong.
public void delete(Object o)
throws ArchiveException
o - the object to delete.
ArchiveException - if anything went wrong.
public boolean exists(String namefield,
String name,
String classname)
throws ArchiveException
load method to make sense.
namefield - The name of the bean property that holds the name to
test.name - The name The actual name we are looking for.classname - The fully qualified class of the persistable bean to
test for.
ArchiveException - if anything went wrong.
public boolean exists(Map fields,
String classname)
throws ArchiveException
load method to make sense. Load an object whose field values
match the values keyed against those field names in the supplied Map.
fields - The map of field valeus keyed against the field names
they corrospond with.classname - The fully qualified class of the object to load.
ArchiveException - if anything went wrong.
public Transaction getTransaction()
throws ArchiveException
ArchiveException - if anything went wrong.
public void flush()
throws ArchiveException
ArchiveException - if anything went wrong.
public void close()
throws ArchiveException
ArchiveException - if anything went wrong.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||