com.bm.testsuite.dataloader
Class EntityInitialDataSet<T>

java.lang.Object
  extended by com.bm.testsuite.dataloader.EntityInitialDataSet<T>
Type Parameters:
T - - der typ des Entity Beans welches initial angelegt wird.
All Implemented Interfaces:
InitialDataSet

public abstract class EntityInitialDataSet<T>
extends java.lang.Object
implements InitialDataSet

Represents an initial dataset for entity beans.

Author:
Daniel Wiese

Constructor Summary
EntityInitialDataSet(java.lang.Class<T> entityType)
          Constructor.
 
Method Summary
protected  void add(T toAdd)
          The inherited class can call this method to add some data.
 void cleanup(javax.persistence.EntityManager em)
          Deletes the data.
 void setEntityManager(javax.persistence.EntityManager em)
          Will be called by the testing framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bm.testsuite.dataloader.InitialDataSet
create
 

Constructor Detail

EntityInitialDataSet

public EntityInitialDataSet(java.lang.Class<T> entityType)
Constructor.

Parameters:
entityType - - die klasse der entity benas die initial angelegt werden sollen.
Method Detail

setEntityManager

public void setEntityManager(javax.persistence.EntityManager em)
Will be called by the testing framework.

Parameters:
em - - the entity manager

add

protected void add(T toAdd)
The inherited class can call this method to add some data.

Parameters:
toAdd - - entyties to add;

cleanup

public void cleanup(javax.persistence.EntityManager em)
Deletes the data.

Specified by:
cleanup in interface InitialDataSet
Parameters:
ds - - the datasource.
Since:
17.04.2006
See Also:
InitialDataSet.cleanup(EntityManager)


Copyright © 2008. All Rights Reserved.