/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Return the failed object for the given exception, performing any * necessary conversions. */ private static Object getFailedObject(OpenJPAException ke) { Object o = ke.getFailedObject(); if (o == null) return null; if (o instanceof Broker) return JPAFacadeHelper.toEntityManager((Broker) o); return JPAFacadeHelper.fromOpenJPAObjectId(o); }
/** * Translate the exception with the failed object. * * @param re exception raised by the delegate. * @param failed the context that failed. * * @return the translated exception. If the given input exception had not set * the failed instance, then sets the given instance as the failed context. */ protected RuntimeException translate(RuntimeException re, Object failed) { if (re instanceof OpenJPAException) { Object o = ((OpenJPAException) re).getFailedObject(); if (o == null || "null".equals(o)) { ((OpenJPAException) re).setFailedObject(Exceptions.toString(failed)); } } return (_trans == null) ? re : _trans.translate(re); }
/** * Translate the exception with the failed object. * * @param re exception raised by the delegate. * @param failed the context that failed. * * @return the translated exception. If the given input exception had not set * the failed instance, then sets the given instance as the failed context. */ protected RuntimeException translate(RuntimeException re, Object failed) { if (re instanceof OpenJPAException) { Object o = ((OpenJPAException) re).getFailedObject(); if (o == null || "null".equals(o)) { ((OpenJPAException) re).setFailedObject(Exceptions.toString(failed)); } } return (_trans == null) ? re : _trans.translate(re); }
/** * Translate the exception with the failed object. * * @param re exception raised by the delegate. * @param failed the context that failed. * * @return the translated exception. If the given input exception had not set * the failed instance, then sets the given instance as the failed context. */ protected RuntimeException translate(RuntimeException re, Object failed) { if (re instanceof OpenJPAException) { Object o = ((OpenJPAException) re).getFailedObject(); if (o == null || "null".equals(o)) { ((OpenJPAException) re).setFailedObject(Exceptions.toString(failed)); } } return (_trans == null) ? re : _trans.translate(re); }
/** * Translate the exception with the failed object. * * @param re exception raised by the delegate. * @param failed the context that failed. * * @return the translated exception. If the given input exception had not set * the failed instance, then sets the given instance as the failed context. */ protected RuntimeException translate(RuntimeException re, Object failed) { if (re instanceof OpenJPAException) { Object o = ((OpenJPAException) re).getFailedObject(); if (o == null || "null".equals(o)) { ((OpenJPAException) re).setFailedObject(Exceptions.toString(failed)); } } return (_trans == null) ? re : _trans.translate(re); }
if (opt && ke.getFailedObject() != null) failed = add(failed, ke.getFailedObject()); exceps = add(exceps, ke);
if (opt && ke.getFailedObject() != null) failed = add(failed, ke.getFailedObject()); exceps = add(exceps, ke);
if (opt && ke.getFailedObject() != null) failed = add(failed, ke.getFailedObject()); exceps = add(exceps, ke);
failedObject = ((OpenJPAException)t[0]).getFailedObject();
failedObject = ((OpenJPAException)t[0]).getFailedObject();
failedObject = ((OpenJPAException)t[0]).getFailedObject();
failedObject = ((OpenJPAException)t[0]).getFailedObject();
_resultLists.add(decorateResultList(res)); } catch (OpenJPAException e) { if (e.getFailedObject() == null) { e.setFailedObject(getQueryString());
_resultLists.add(decorateResultList(res)); } catch (OpenJPAException e) { if (e.getFailedObject() == null) { e.setFailedObject(getQueryString());
_resultLists.add(decorateResultList(res)); } catch (OpenJPAException e) { if (e.getFailedObject() == null) { e.setFailedObject(getQueryString());
_resultLists.add(decorateResultList(res)); } catch (OpenJPAException e) { if (e.getFailedObject() == null) { e.setFailedObject(getQueryString());