private Collection flush(Collection states, JDBCStore store, PreparedStatementManager psMgr) { // run through all the states and update them as necessary RowManager rowMgr = newRowManager(); Collection customs = new LinkedList(); Collection exceps = null; for (Iterator itr = states.iterator(); itr.hasNext();) exceps = populateRowManager((OpenJPAStateManager) itr.next(), rowMgr, store, exceps, customs); // flush rows exceps = flush(rowMgr, psMgr, exceps); // now do any custom mappings for (Iterator itr = customs.iterator(); itr.hasNext();) { try { ((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { exceps = addException(exceps, ke); } } // return all exceptions Collection psExceps = psMgr.getExceptions(); if (exceps == null) return psExceps; if (psExceps == null) return exceps; exceps.addAll(psExceps); return exceps; }
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { exceps = addException(exceps, ke);
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { exceps = addException(exceps, ke);
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { exceps = addException(exceps, ke);
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { exceps = addException(exceps, ke);
if (!((ClassMapping) sm.getMetaData()).getVersion(). checkVersion(sm, store, false)) exceps = addException(exceps, new OptimisticException(sm. getManagedInstance())); exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { exceps = addException(exceps, ke);
if (!((ClassMapping) sm.getMetaData()).getVersion(). checkVersion(sm, store, false)) exceps = addException(exceps, new OptimisticException(sm. getManagedInstance())); exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { RowImpl row = (RowImpl) rowMgr.getRow(((ClassMapping) sm.getMetaData()).getTable(), action, sm, false); row.setFlushed(true); exceps = addException(exceps, ke);
if (!((ClassMapping) sm.getMetaData()).getVersion(). checkVersion(sm, store, false)) exceps = addException(exceps, new OptimisticException(sm. getManagedInstance())); exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { RowImpl row = (RowImpl) rowMgr.getRow(((ClassMapping) sm.getMetaData()).getTable(), action, sm, false); row.setFlushed(true); exceps = addException(exceps, ke);
if (!((ClassMapping) sm.getMetaData()).getVersion(). checkVersion(sm, store, false)) exceps = addException(exceps, new OptimisticException(sm. getManagedInstance())); exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { RowImpl row = (RowImpl) rowMgr.getRow(((ClassMapping) sm.getMetaData()).getTable(), action, sm, false); row.setFlushed(true); exceps = addException(exceps, ke);
if (!((ClassMapping) sm.getMetaData()).getVersion(). checkVersion(sm, store, false)) exceps = addException(exceps, new OptimisticException(sm. getManagedInstance())); exceps = addException(exceps, SQLExceptions.getStore(se, dict)); } catch (OpenJPAException ke) { RowImpl row = (RowImpl) rowMgr.getRow(((ClassMapping) sm.getMetaData()).getTable(), action, sm, false); row.setFlushed(true); exceps = addException(exceps, ke);