Package org.dawnsci.persistence.internal
Class PersistenceServiceImpl
java.lang.Object
org.dawnsci.persistence.internal.PersistenceServiceImpl
- All Implemented Interfaces:
IPersistenceService
Implementation of IPersistenceService
This class is internal and not supposed to be used out of this bundle.
This class is internal and not supposed to be used out of this bundle.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePersistentFile(Object file) createPersistentFile(String filePath) Method to save an IPersistentFilegetPersistentFile(String filePath) Method to read / load an IPersistentFilePersists objects to Tree file nodesReturns a JSON string given an Object beanReturns an object bean given a JSon String<T> TReturns an object of class clazz given a JSon String and the objects class
-
Constructor Details
-
PersistenceServiceImpl
public PersistenceServiceImpl()Default Constructor
-
-
Method Details
-
getPersistentFile
Description copied from interface:IPersistenceServiceMethod to read / load an IPersistentFile- Specified by:
getPersistentFilein interfaceIPersistenceService- Parameters:
filePath-- Returns:
- IPersistentFile
- Throws:
Exception
-
createPersistentFile
Description copied from interface:IPersistenceServiceMethod to save an IPersistentFile- Specified by:
createPersistentFilein interfaceIPersistenceService- Parameters:
filePath-- Returns:
- IPersistentFile
- Throws:
Exception
-
createPersistentFile
- Specified by:
createPersistentFilein interfaceIPersistenceService- Parameters:
file- - currently must be a String, File or NexusFile otherwise an exception is thrown- Returns:
- file
- Throws:
Exception
-
unmarshal
Description copied from interface:IPersistenceServiceReturns an object bean given a JSon String- Specified by:
unmarshalin interfaceIPersistenceService- Parameters:
json-- Returns:
- obj
- Throws:
Exception
-
unmarshal
Description copied from interface:IPersistenceServiceReturns an object of class clazz given a JSon String and the objects class- Specified by:
unmarshalin interfaceIPersistenceService- Parameters:
json-clazz-- Returns:
- T
- Throws:
Exception
-
marshal
Description copied from interface:IPersistenceServiceReturns a JSON string given an Object bean- Specified by:
marshalin interfaceIPersistenceService- Parameters:
obj-- Returns:
- string
- Throws:
Exception
-
getPersistentNodeFactory
Description copied from interface:IPersistenceServicePersists objects to Tree file nodes- Specified by:
getPersistentNodeFactoryin interfaceIPersistenceService- Returns:
- factory
-