org.apache.ojb.broker.cache
Class ObjectCacheEmptyImpl

java.lang.Object
  extended byorg.apache.ojb.broker.cache.ObjectCacheEmptyImpl
All Implemented Interfaces:
ObjectCache

public class ObjectCacheEmptyImpl
extends java.lang.Object
implements ObjectCache

This is an 'empty' ObjectCache implementation. Useful when caching was not desired.
NOTE: This implementation does not prevent infinite loops caused by 'circular references' of loaded object graphs. (this will change in versions > 1.0).

Implementation configuration properties:

Property Key Property Values
- -

Version:
$Id: ObjectCacheEmptyImpl.java,v 1.10 2003/12/31 12:01:56 arminw Exp $
Author:
Thomas Mahler

Constructor Summary
ObjectCacheEmptyImpl(PersistenceBroker broker, java.util.Properties prop)
           
 
Method Summary
 void cache(Identity oid, java.lang.Object obj)
          makes object obj persistent to the Objectcache under the key oid.
 void clear()
          clear the ObjectCache.
 java.lang.Object lookup(Identity oid)
          Lookup object with Identity oid in objectTable.
 void remove(Identity oid)
          removes an Object from the cache.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectCacheEmptyImpl

public ObjectCacheEmptyImpl(PersistenceBroker broker,
                            java.util.Properties prop)
Method Detail

cache

public void cache(Identity oid,
                  java.lang.Object obj)
Description copied from interface: ObjectCache
makes object obj persistent to the Objectcache under the key oid.

Specified by:
cache in interface ObjectCache
See Also:
ObjectCache.cache(Identity, Object)

lookup

public java.lang.Object lookup(Identity oid)
Description copied from interface: ObjectCache
Lookup object with Identity oid in objectTable. returns null if no matching id is found

Specified by:
lookup in interface ObjectCache
See Also:
ObjectCache.lookup(Identity)

remove

public void remove(Identity oid)
Description copied from interface: ObjectCache
removes an Object from the cache.

Specified by:
remove in interface ObjectCache
Parameters:
oid - Identity of the object to be removed.
See Also:
ObjectCache.remove(Identity)

clear

public void clear()
Description copied from interface: ObjectCache
clear the ObjectCache.

Specified by:
clear in interface ObjectCache
See Also:
ObjectCache.clear()

toString

public java.lang.String toString()


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14