@PersistenceContext).
Note that this interface did not get upgraded to JPA 2.0 and never will.@Deprecated public interface JpaOperations
JpaTemplate. Not often used, but a useful
option to enhance testability, as it can easily be mocked or stubbed.
Defines JpaTemplate's data access methods that mirror
various EntityManager methods. Users are
strongly encouraged to read the JPA EntityManager
javadocs for details on the semantics of those methods.
Note that lazy loading will just work with an open JPA
EntityManager, either within a managed transaction or within
OpenEntityManagerInViewFilter/
OpenEntityManagerInViewInterceptor.
Furthermore, some operations just make sense within transactions,
for example: flush, clear.
JpaTemplate,
EntityManager,
JpaTransactionManager,
JpaDialect,
OpenEntityManagerInViewFilter,
OpenEntityManagerInViewInterceptor| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Object entity)
Deprecated.
|
<T> T |
execute(JpaCallback<T> action)
Deprecated.
|
List |
executeFind(JpaCallback<?> action)
Deprecated.
|
<T> T |
find(Class<T> entityClass,
Object id)
Deprecated.
|
List |
find(String queryString)
Deprecated.
|
List |
find(String queryString,
Object... values)
Deprecated.
|
List |
findByNamedParams(String queryString,
Map<String,?> params)
Deprecated.
|
List |
findByNamedQuery(String queryName)
Deprecated.
|
List |
findByNamedQuery(String queryName,
Object... values)
Deprecated.
|
List |
findByNamedQueryAndNamedParams(String queryName,
Map<String,?> params)
Deprecated.
|
void |
flush()
Deprecated.
|
<T> T |
getReference(Class<T> entityClass,
Object id)
Deprecated.
|
<T> T |
merge(T entity)
Deprecated.
|
void |
persist(Object entity)
Deprecated.
|
void |
refresh(Object entity)
Deprecated.
|
void |
remove(Object entity)
Deprecated.
|
<T> T execute(JpaCallback<T> action) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionList executeFind(JpaCallback<?> action) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException<T> T find(Class<T> entityClass, Object id) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException<T> T getReference(Class<T> entityClass, Object id) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionboolean contains(Object entity) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionvoid refresh(Object entity) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionvoid persist(Object entity) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException<T> T merge(T entity)
throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionvoid remove(Object entity) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionvoid flush()
throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionList find(String queryString) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionList find(String queryString, Object... values) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionList findByNamedParams(String queryString, Map<String,?> params) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionList findByNamedQuery(String queryName) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessExceptionList findByNamedQuery(String queryName, Object... values) throws org.springframework.dao.DataAccessException
org.springframework.dao.DataAccessException