com.github.smokestack.jpa
Class MockEntityManager
java.lang.Object
com.github.smokestack.jpa.MockEntityManager
- All Implemented Interfaces:
- EntityManager
public class MockEntityManager
- extends Object
- implements EntityManager
- Author:
- gliptak
map
protected Map map
flushModeType
protected FlushModeType flushModeType
mockEntityTransaction
protected MockEntityTransaction mockEntityTransaction
mockState
protected MockEntityManager.EntityManagerState mockState
MockEntityManager
public MockEntityManager()
- Constructor
MockEntityManager
public MockEntityManager(Map map)
- Constructor
clear
public void clear()
- Specified by:
clear
in interface EntityManager
close
public void close()
- Specified by:
close
in interface EntityManager
_close
public void _close()
contains
public boolean contains(Object entity)
- Specified by:
contains
in interface EntityManager
createNamedQuery
public Query createNamedQuery(String name)
- Specified by:
createNamedQuery
in interface EntityManager
_createNamedQuery
public Query _createNamedQuery(String name)
createNativeQuery
public Query createNativeQuery(String sqlString)
- Specified by:
createNativeQuery
in interface EntityManager
_createNativeQuery
public Query _createNativeQuery(String sqlString)
createNativeQuery
public Query createNativeQuery(String sqlString,
Class resultClass)
- Specified by:
createNativeQuery
in interface EntityManager
_createNativeQuery
public Query _createNativeQuery(String sqlString,
Class resultClass)
createNativeQuery
public Query createNativeQuery(String sqlString,
String resultSetMapping)
- Specified by:
createNativeQuery
in interface EntityManager
_createNativeQuery
public Query _createNativeQuery(String sqlString,
String resultSetMapping)
createQuery
public Query createQuery(String qlString)
- Specified by:
createQuery
in interface EntityManager
_createQuery
public Query _createQuery(String qlString)
find
public <T> T find(Class<T> arg0,
Object arg1)
- Specified by:
find
in interface EntityManager
_find
public <T> T _find(Class<T> arg0,
Object arg1)
flush
public void flush()
- Specified by:
flush
in interface EntityManager
getDelegate
public Object getDelegate()
- Specified by:
getDelegate
in interface EntityManager
getFlushMode
public FlushModeType getFlushMode()
- Specified by:
getFlushMode
in interface EntityManager
_getFlushMode
public FlushModeType _getFlushMode()
getReference
public <T> T getReference(Class<T> arg0,
Object arg1)
- Specified by:
getReference
in interface EntityManager
_getReference
public <T> T _getReference(Class<T> arg0,
Object arg1)
getTransaction
public EntityTransaction getTransaction()
- Specified by:
getTransaction
in interface EntityManager
_getTransaction
public EntityTransaction _getTransaction()
isOpen
public boolean isOpen()
- Specified by:
isOpen
in interface EntityManager
_isOpen
public boolean _isOpen()
joinTransaction
public void joinTransaction()
- Specified by:
joinTransaction
in interface EntityManager
lock
public void lock(Object arg0,
LockModeType arg1)
- Specified by:
lock
in interface EntityManager
merge
public <T> T merge(T arg0)
- Specified by:
merge
in interface EntityManager
_merge
public <T> T _merge(T arg0)
persist
public void persist(Object arg0)
- Specified by:
persist
in interface EntityManager
_persist
public void _persist(Object arg0)
refresh
public void refresh(Object arg0)
- Specified by:
refresh
in interface EntityManager
_refresh
public void _refresh(Object arg0)
remove
public void remove(Object arg0)
- Specified by:
remove
in interface EntityManager
_remove
public void _remove(Object arg0)
setFlushMode
public void setFlushMode(FlushModeType flushModeType)
- Specified by:
setFlushMode
in interface EntityManager
_setFlushMode
public void _setFlushMode(FlushModeType flushModeType)
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 MockEntityManager.EntityManagerState getMockState()
getMockEntityTransaction
public MockEntityTransaction getMockEntityTransaction()
Copyright © 2009-2010 Smokestack. All Rights Reserved.