com.github.smokestack.jpa
Class MockEntityManagerFactory

java.lang.Object
  extended by com.github.smokestack.jpa.MockEntityManagerFactory
All Implemented Interfaces:
EntityManagerFactory

public class MockEntityManagerFactory
extends Object
implements EntityManagerFactory

Author:
gliptak

Nested Class Summary
static class MockEntityManagerFactory.EMFactoryState
           
 
Field Summary
protected  List<MockEntityManager> mockEntityManagers
           
protected  MockEntityManagerFactory.EMFactoryState mockState
           
 
Constructor Summary
MockEntityManagerFactory()
          Constructor
 
Method Summary
 void _close()
           
 EntityManager _createEntityManager()
           
 EntityManager _createEntityManager(Map map)
           
 boolean _isOpen()
           
 void assertMockCommit()
          Validation
 void assertMockComplete()
          Validation
 void assertMockRollback()
          Validation
 void close()
           
 EntityManager createEntityManager()
           
 EntityManager createEntityManager(Map map)
           
 MockEntityManagerFactory.EMFactoryState getMockState()
           
 boolean isOpen()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mockState

protected MockEntityManagerFactory.EMFactoryState mockState

mockEntityManagers

protected List<MockEntityManager> mockEntityManagers
Constructor Detail

MockEntityManagerFactory

public MockEntityManagerFactory()
Constructor

Method Detail

close

public void close()
Specified by:
close in interface EntityManagerFactory

_close

public void _close()

createEntityManager

public EntityManager createEntityManager()
Specified by:
createEntityManager in interface EntityManagerFactory

_createEntityManager

public EntityManager _createEntityManager()

createEntityManager

public EntityManager createEntityManager(Map map)
Specified by:
createEntityManager in interface EntityManagerFactory

_createEntityManager

public EntityManager _createEntityManager(Map map)

isOpen

public boolean isOpen()
Specified by:
isOpen in interface EntityManagerFactory

_isOpen

public boolean _isOpen()

toString

public String toString()
Overrides:
toString in class Object

assertMockComplete

public void assertMockComplete()
Validation


assertMockCommit

public void assertMockCommit()
Validation


assertMockRollback

public void assertMockRollback()
Validation


getMockState

public MockEntityManagerFactory.EMFactoryState getMockState()


Copyright © 2009-2010 Smokestack. All Rights Reserved.