org.apache.lenya.transaction
Class IdentityMapImpl

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.lenya.transaction.IdentityMapImpl
All Implemented Interfaces:
org.apache.avalon.framework.logger.LogEnabled, IdentityMap

public final class IdentityMapImpl
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements IdentityMap

Identity map implementation.

Version:
$Id: IdentityMapImpl.java 473861 2006-11-12 03:51:14Z gregor $

Constructor Summary
IdentityMapImpl(org.apache.avalon.framework.logger.Logger logger)
          Ctor.
 
Method Summary
 java.lang.Object get(IdentifiableFactory factory, java.lang.String key)
          Retrieve an instance from the map.
 java.lang.Object[] getObjects()
           
 UnitOfWork getUnitOfWork()
          Returns the unit of work.
 void setUnitOfWork(UnitOfWork unit)
           
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentityMapImpl

public IdentityMapImpl(org.apache.avalon.framework.logger.Logger logger)
Ctor.

Parameters:
logger - The logger.
Method Detail

get

public java.lang.Object get(IdentifiableFactory factory,
                            java.lang.String key)
Description copied from interface: IdentityMap
Retrieve an instance from the map. If no instance exists for the given key, the factory is used to build one.

Specified by:
get in interface IdentityMap
Parameters:
factory - The factory that produces the identifable.
key - The key for the identifiable.
Returns:
An identifiable.

getUnitOfWork

public UnitOfWork getUnitOfWork()
Description copied from interface: IdentityMap
Returns the unit of work. This maybe null if the identity map is not involved in a transaction.

Specified by:
getUnitOfWork in interface IdentityMap
Returns:
The unit of work.
See Also:
IdentityMap.getUnitOfWork()

setUnitOfWork

public void setUnitOfWork(UnitOfWork unit)
Specified by:
setUnitOfWork in interface IdentityMap
Parameters:
unit - The unit of work to use.
See Also:
IdentityMap.setUnitOfWork(org.apache.lenya.transaction.UnitOfWork)

getObjects

public java.lang.Object[] getObjects()
Specified by:
getObjects in interface IdentityMap
Returns:
All objects in this map.
See Also:
IdentityMap.getObjects()


Copyright © 1999-2006 Apache Software Foundation. All Rights Reserved.