com.ashridgetech.prevdb.test
Class TestSystemStore

java.lang.Object
  |
  +--com.ashridgetech.prevdb.test.TestSystemStore
All Implemented Interfaces:
SystemStore

class TestSystemStore
extends Object
implements SystemStore

A mock object implementation of SystemStore for testing.


Field Summary
(package private)  Map classFieldMapListMap
           
protected  org.apache.log4j.Logger log
           
(package private)  List savedTransactions
           
 
Constructor Summary
(package private) TestSystemStore()
           
 
Method Summary
(package private)  Transaction getLastSavedTransaction()
           
 void load(Loader loader)
          Load all the Persistent objects at startup.
 void saveTransaction(Transaction tran)
          Save a Transaction
 void shutdown(Loader loader)
          Perform the actions needed when the system is shutting down, which may include saving a snapshot of all the objects.
 void snapshot(Loader loader)
          Take a snapshot of all the persistent objects during running, if required.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.log4j.Logger log

savedTransactions

List savedTransactions

classFieldMapListMap

Map classFieldMapListMap
Constructor Detail

TestSystemStore

TestSystemStore()
Method Detail

getLastSavedTransaction

Transaction getLastSavedTransaction()

load

public void load(Loader loader)
          throws DataException
Description copied from interface: SystemStore
Load all the Persistent objects at startup.

Specified by:
load in interface SystemStore
Parameters:
loader - the callback interface for the SystemStore to load objects.
DataException

snapshot

public void snapshot(Loader loader)
Description copied from interface: SystemStore
Take a snapshot of all the persistent objects during running, if required. May be ignored by some implementations.

Specified by:
snapshot in interface SystemStore
Parameters:
loader - the callback interface for the SystemStore to save objects.

saveTransaction

public void saveTransaction(Transaction tran)
Description copied from interface: SystemStore
Save a Transaction

Specified by:
saveTransaction in interface SystemStore
Parameters:
tran - the Transaction to save

shutdown

public void shutdown(Loader loader)
Description copied from interface: SystemStore
Perform the actions needed when the system is shutting down, which may include saving a snapshot of all the objects.

Specified by:
shutdown in interface SystemStore
Parameters:
loader - the callback interface for the SystemStore to save objects.


Copyright © 2003 Ashridge Technologies Ltd. All Rights Reserved.