org.spicefactory.pimento.io.util
Class IdResolver

java.lang.Object
  extended by org.spicefactory.pimento.io.util.IdResolver

public class IdResolver
extends Object

Resolves ids for persisted entities that might not be available before transaction commit.

Author:
Jens Halm

Constructor Summary
IdResolver(Object entity, EntityMetadata metadata)
          Creates a new instance.
 
Method Summary
 Object resolve()
          Returns the id for the entity encapsulated by this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdResolver

public IdResolver(Object entity,
                  EntityMetadata metadata)
Creates a new instance.

Parameters:
entity - the entity whose id should be resolved
metadata - the metadata for the entity
Method Detail

resolve

public Object resolve()
Returns the id for the entity encapsulated by this instance.

Returns:
the id for the entity encapsulated by this instance