biz.hammurapi.legacy.persistence
Class MemoryStorage

java.lang.Object
  extended by biz.hammurapi.legacy.persistence.MemoryStorage
All Implemented Interfaces:
Storage

public class MemoryStorage
extends java.lang.Object
implements Storage

This class allows to persist and unload from memory persistable objects which refer to non-persistable objects.

Version:
$Revision: 1.1 $
Author:
Pavel Vlasov

Constructor Summary
MemoryStorage()
           
 
Method Summary
 java.lang.Object get(java.lang.String key)
          Retrieves object from storage
 java.lang.String put(java.lang.Object o)
          Stores object to storage and returns key.
 void remove(java.lang.String key)
          Removes object from storage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryStorage

public MemoryStorage()
Method Detail

put

public java.lang.String put(java.lang.Object o)
Description copied from interface: Storage
Stores object to storage and returns key.

Specified by:
put in interface Storage
Returns:
key. If key is null then storage could not store the object.

remove

public void remove(java.lang.String key)
Description copied from interface: Storage
Removes object from storage

Specified by:
remove in interface Storage

get

public java.lang.Object get(java.lang.String key)
Description copied from interface: Storage
Retrieves object from storage

Specified by:
get in interface Storage
Returns:


Copyright © 2003 Hammurapi Group. All Rights Reserved.