org.apache.lenya.transaction
Interface IdentityMap

All Known Implementing Classes:
IdentityMapImpl

public interface IdentityMap

Identity map.

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

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)
           
 

Method Detail

get

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

Parameters:
factory - The factory that produces the identifable.
key - The key for the identifiable.
Returns:
An identifiable.

getUnitOfWork

UnitOfWork getUnitOfWork()
Returns the unit of work. This maybe null if the identity map is not involved in a transaction.

Returns:
The unit of work.

setUnitOfWork

void setUnitOfWork(UnitOfWork unit)
Parameters:
unit - The unit of work to use.

getObjects

java.lang.Object[] getObjects()
Returns:
All objects in this map.


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