| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.gridsystems.storage.DAOManager
public final class DAOManager
Manages object load and store through a DAO instance.
| Method Summary | ||
|---|---|---|
static
 | 
delete(DAO<T> dao,
       T obj)
Deletes all files associated to the specified object.  | 
|
static
 | 
load(DAO<T> dao,
     java.util.Map<java.lang.String,java.lang.String> data)
Loads an object from the specified DAO, using data as initialization info.  | 
|
static
 | 
store(DAO<T> dao,
      T obj)
Stores an object through the specified DAO.  | 
|
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Method Detail | 
|---|
public static <T> T load(DAO<T> dao,
                         java.util.Map<java.lang.String,java.lang.String> data)
              throws java.lang.Exception
It first attempts to load from the regular files. If an error occurs, it will try again with the backup files.
T - Class to store/load.dao - The DAO to delegate todata - The initialization data
java.lang.Exception - In case of unrecoverable load error
public static <T> void store(DAO<T> dao,
                             T obj)
                  throws java.lang.Exception
It first stores the object in the backup file. If no error occurs, it then stores the regular ones.
T - Class to store/load.dao - The DAO to delegate toobj - The object to store
java.lang.Exception - In case of unrecoverable error
public static <T> void delete(DAO<T> dao,
                              T obj)
T - Class to store/load.dao - The DAO to useobj - The object whose files to delete
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||