1 16 17 package org.springframework.orm.jpa; 18 19 import java.util.List ; 20 import java.util.Map ; 21 22 import org.springframework.dao.DataAccessException; 23 24 50 public interface JpaOperations { 51 52 Object execute(JpaCallback action) throws DataAccessException; 53 54 List executeFind(JpaCallback action) throws DataAccessException; 55 56 <T> T find(Class <T> entityClass, Object id) throws DataAccessException; 57 58 <T> T getReference(Class <T> entityClass, Object id) throws DataAccessException; 59 60 boolean contains(Object entity) throws DataAccessException; 61 62 void refresh(Object entity) throws DataAccessException; 63 64 void persist(Object entity) throws DataAccessException; 65 66 <T> T merge(T entity) throws DataAccessException; 67 68 void remove(Object entity) throws DataAccessException; 69 70 void flush() throws DataAccessException; 71 72 List find(String queryString) throws DataAccessException; 73 74 List find(String queryString, Object ... values) throws DataAccessException; 75 76 List findByNamedParams(String queryString, Map <String ,? extends Object > params) throws DataAccessException; 77 78 List findByNamedQuery(String queryName) throws DataAccessException; 79 80 List findByNamedQuery(String queryName, Object ... values) throws DataAccessException; 81 82 List findByNamedQueryAndNamedParams(String queryName, Map <String ,? extends Object > params) throws DataAccessException; 83 84 } 85 | Popular Tags |