1 16 17 package org.springframework.orm.jdo; 18 19 import java.sql.SQLException ; 20 import java.util.Collection ; 21 22 import javax.jdo.JDOException; 23 import javax.jdo.PersistenceManager; 24 import javax.jdo.Query; 25 import javax.jdo.Transaction; 26 27 import org.springframework.dao.DataAccessException; 28 import org.springframework.jdbc.datasource.ConnectionHandle; 29 import org.springframework.transaction.TransactionDefinition; 30 import org.springframework.transaction.TransactionException; 31 32 60 public interface JdoDialect { 61 62 66 91 Object beginTransaction(Transaction transaction, TransactionDefinition definition) 92 throws JDOException, SQLException , TransactionException; 93 94 105 void cleanupTransaction(Object transactionData); 106 107 138 ConnectionHandle getJdbcConnection(PersistenceManager pm, boolean readOnly) 139 throws JDOException, SQLException ; 140 141 154 void releaseJdbcConnection(ConnectionHandle conHandle, PersistenceManager pm) 155 throws JDOException, SQLException ; 156 157 158 162 170 Object detachCopy(PersistenceManager pm, Object entity) throws JDOException; 171 172 180 Collection detachCopyAll(PersistenceManager pm, Collection entities) throws JDOException; 181 182 192 Object attachCopy(PersistenceManager pm, Object detachedEntity) throws JDOException; 193 194 204 Collection attachCopyAll(PersistenceManager pm, Collection detachedEntities) throws JDOException; 205 206 215 void flush(PersistenceManager pm) throws JDOException; 216 217 226 Query newNamedQuery(PersistenceManager pm, Class entityClass, String queryName) throws JDOException; 227 228 237 void applyQueryTimeout(Query query, int timeout) throws JDOException; 238 239 240 244 262 DataAccessException translateException(JDOException ex); 263 264 } 265 | Popular Tags |