org.granite.tide.data
Class AbstractTidePersistenceManager

java.lang.Object
  extended by org.granite.tide.data.AbstractTidePersistenceManager
All Implemented Interfaces:
TidePersistenceManager
Direct Known Subclasses:
JDOPersistenceManager, JPAPersistenceManager

public abstract class AbstractTidePersistenceManager
extends Object
implements TidePersistenceManager

Responsible for attaching a entity with the entity mangager

Author:
cingram

Field Summary
protected  TideTransactionManager tm
           
 
Constructor Summary
AbstractTidePersistenceManager(TideTransactionManager tm)
           
 
Method Summary
 Object attachEntity(Object entity, String[] propertyNames)
          Fetch the entity with its lazy properties from the persistence context.
 Object attachEntity(TidePersistenceManager pm, Object entity, String[] propertyNames)
          Attach the passed in entity with the EntityManager.
abstract  Object fetchEntity(Object entity, String[] fetch)
          Fetch the entity with its lazy properties from the persistence context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tm

protected TideTransactionManager tm
Constructor Detail

AbstractTidePersistenceManager

public AbstractTidePersistenceManager(TideTransactionManager tm)
Method Detail

attachEntity

public Object attachEntity(Object entity,
                           String[] propertyNames)
Description copied from interface: TidePersistenceManager
Fetch the entity with its lazy properties from the persistence context.

Specified by:
attachEntity in interface TidePersistenceManager
Parameters:
entity - entity to load
propertyNames - array of property names to fetch
Returns:
the entity with the persistence context.

attachEntity

public Object attachEntity(TidePersistenceManager pm,
                           Object entity,
                           String[] propertyNames)
Attach the passed in entity with the EntityManager.

Parameters:
entity -
Returns:
the attached entity object

fetchEntity

public abstract Object fetchEntity(Object entity,
                                   String[] fetch)
Fetch the entity with its lazy properties from the persistence context.

Parameters:
entity - entity to load
fetch - array of property names to fetch
Returns:
the entity with the persistence context.