|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.datamanager.persistence.serializable.SerializableDataAccessObject
Supports persistence of objects across sessions using plain Java serialization. All objects persisted with this class must implement Serializable.
Constructor Summary | |
SerializableDataAccessObject()
|
Method Summary | |
void |
persist(Object object,
File file)
keep the object as a xml file in the disk |
void |
persist(Object object,
OutputStream outputStream)
keep the object as a xml file in the disk |
Object |
restore(File fileLocation)
return the instance object which store in the xml file the client need to cast the return to the correct type. |
Object |
restore(InputStream inputStream)
return the instance object which store in the xml file the client need to cast the return to the correct type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SerializableDataAccessObject()
Method Detail |
public void persist(Object object, File file)
DataAccessObject
persist
in interface DataAccessObject
object
- any objectfile
- name and path to keep the object as file on diskpublic Object restore(File fileLocation)
DataAccessObject
restore
in interface DataAccessObject
fileLocation
- xml file path
public void persist(Object object, OutputStream outputStream)
DataAccessObject
persist
in interface DataAccessObject
object
- any objectoutputStream
- write to output streampublic Object restore(InputStream inputStream)
DataAccessObject
restore
in interface DataAccessObject
inputStream
- read from input stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |