org.apache.ojb.broker.cache
Class ObjectCacheEmptyImpl

java.lang.Object
  extended by org.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 365232 2005-12-21 22:36:07Z tomdz $
Author:
Thomas Mahler

Constructor Summary
ObjectCacheEmptyImpl(PersistenceBroker broker, java.util.Properties prop)
           
 
Method Summary
 void cache(Identity oid, java.lang.Object obj)
          Used to cache objects by it's Identity.
 void clear()
          Clear the cache.
 java.lang.Object lookup(Identity oid)
          Lookup object with Identity 'oid' in cache.
 void remove(Identity oid)
          Removes an Object from the cache.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, 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
Used to cache objects by it's Identity.

Specified by:
cache in interface ObjectCache
Parameters:
oid - Identity of the object to cache.
obj - The object to cache.
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 cache.

Specified by:
lookup in interface ObjectCache
Parameters:
oid - Identity of the object to search for.
Returns:
The cached object or null if no matching object for specified Identity is found.
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 cache.

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30