org.gcube.common.core.persistence
Class GCUBEWSFields2FilePersistenceDelegate<RESOURCE extends GCUBEWSFieldsSerializableResource>

java.lang.Object
  extended by org.gcube.common.core.persistence.GCUBEPersistenceDelegate<RESOURCEID,RESOURCE>
      extended by org.gcube.common.core.persistence.GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE>
          extended by org.gcube.common.core.persistence.GCUBEWSFilePersistenceDelegate<RESOURCE>
              extended by org.gcube.common.core.persistence.GCUBEWSFields2FilePersistenceDelegate<RESOURCE>
Type Parameters:
RESOURCE - the type of the associated resource

public class GCUBEWSFields2FilePersistenceDelegate<RESOURCE extends GCUBEWSFieldsSerializableResource>
extends GCUBEWSFilePersistenceDelegate<RESOURCE>

Delegate to persist an arbitrary list of Serializable objects, plus the standard RPs

Author:
Manuele Simi (ISTI-CNR)

Nested Class Summary
static interface GCUBEWSFields2FilePersistenceDelegate.WSFieldsSerializable
          Enable serialization/deserialization of an arbitrary list of objects using the GCUBEWSFields2FilePersistenceDelegate
 
Field Summary
 
Fields inherited from class org.gcube.common.core.persistence.GCUBEWSFilePersistenceDelegate
ctxt, WSRESOURCE_FILE_SUFFIX
 
Fields inherited from class org.gcube.common.core.persistence.GCUBEPersistenceDelegate
logger
 
Constructor Summary
GCUBEWSFields2FilePersistenceDelegate()
           
 
Method Summary
protected  void onLoad(RESOURCE resource, ObjectInputStream stream)
          Deserialises the state of resource from a ObjectInputStream.
protected  void onStore(RESOURCE resource, ObjectOutputStream stream)
          Serialises the state of a resource into a ObjectOutputStream.
 
Methods inherited from class org.gcube.common.core.persistence.GCUBEWSFilePersistenceDelegate
getFileFromResource, getIDFromFileName, getSuffix, initialise
 
Methods inherited from class org.gcube.common.core.persistence.GCUBEFilePersistenceDelegate
getResourceIdentifiers, getStorageRoot, onLoad, onRemove, onStore
 
Methods inherited from class org.gcube.common.core.persistence.GCUBEPersistenceDelegate
load, remove, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GCUBEWSFields2FilePersistenceDelegate

public GCUBEWSFields2FilePersistenceDelegate()
Method Detail

onLoad

protected void onLoad(RESOURCE resource,
                      ObjectInputStream stream)
               throws Exception
Deserialises the state of resource from a ObjectInputStream. Extends in accordance with resource semantics.

Overrides:
onLoad in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSFieldsSerializableResource>
stream - the stream.
Throws:
Exception - if the stream could not be processed.

onStore

protected void onStore(RESOURCE resource,
                       ObjectOutputStream stream)
                throws Exception
Serialises the state of a resource into a ObjectOutputStream. Extend in accordance with resource semantics.

Overrides:
onStore in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSFieldsSerializableResource>
stream - the stream.
Throws:
Exception - if the stream could not be processed.


Copyright © 2012. All Rights Reserved.