/** * If the given mapping uses a custom insert, places a * {@link CustomMapping} struct for it in the given collection and * returns true, else returns false. */ private boolean bufferCustomInsert(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomInsert(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.INSERT, sm, strat)); return Boolean.TRUE.equals(custom); }
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict));
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict));
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict));
((CustomMapping) itr.next()).execute(store); } catch (SQLException se) { exceps = addException(exceps, SQLExceptions.getStore(se, dict));
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; }
/** * @see #bufferCustomInsert */ private boolean bufferCustomDelete(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.DELETE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomUpdate(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomUpdate(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.UPDATE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * If the given mapping uses a custom insert, places a * {@link CustomMapping} struct for it in the given collection and * returns true, else returns false. */ private boolean bufferCustomInsert(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomInsert(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.INSERT, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomDelete(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.DELETE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomUpdate(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomUpdate(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.UPDATE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomDelete(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.DELETE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * If the given mapping uses a custom insert, places a * {@link CustomMapping} struct for it in the given collection and * returns true, else returns false. */ private boolean bufferCustomInsert(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomInsert(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.INSERT, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomDelete(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.DELETE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * If the given mapping uses a custom insert, places a * {@link CustomMapping} struct for it in the given collection and * returns true, else returns false. */ private boolean bufferCustomInsert(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomInsert(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.INSERT, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomUpdate(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomUpdate(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.UPDATE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomUpdate(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomUpdate(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.UPDATE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomUpdate(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomUpdate(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.UPDATE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * @see #bufferCustomInsert */ private boolean bufferCustomDelete(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomDelete(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.DELETE, sm, strat)); return Boolean.TRUE.equals(custom); }
/** * If the given mapping uses a custom insert, places a * {@link CustomMapping} struct for it in the given collection and * returns true, else returns false. */ private boolean bufferCustomInsert(Strategy strat, OpenJPAStateManager sm, JDBCStore store, Collection customs) { Boolean custom = strat.isCustomInsert(sm, store); if (!Boolean.FALSE.equals(custom)) customs.add(new CustomMapping(CustomMapping.INSERT, sm, strat)); return Boolean.TRUE.equals(custom); }