throw new QueryInvocationException(e, context);
public QueryInvocationException(Throwable t, Class<?> proxy, Method method) { super(createMessage(proxy, method, t), t); }
private Object invoke(EntityViewDelegateQueryHandler delegate, EntityViewCdiQueryInvocationContext context) { try { Method extract = ClassUtils.extractPossiblyGenericMethod(delegate.getClass(), context.getMethod()); return extract.invoke(delegate, context.getMethodParameters()); } catch (InvocationTargetException e) { if (e.getCause() != null && e.getCause() instanceof PersistenceException) { throw (PersistenceException) e.getCause(); } throw new QueryInvocationException(e, context); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }
public QueryInvocationException(String message, QueryInvocationContext context) { super(createMessage(context)); }
private Object invoke(EntityViewDelegateQueryHandler delegate, EntityViewCdiQueryInvocationContext context) { try { Method extract = ClassUtils.extractPossiblyGenericMethod(delegate.getClass(), context.getMethod()); return extract.invoke(delegate, context.getMethodParameters()); } catch (InvocationTargetException e) { if (e.getCause() != null && e.getCause() instanceof PersistenceException) { throw (PersistenceException) e.getCause(); } throw new QueryInvocationException(e, context); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }
public QueryInvocationException(Throwable t, QueryInvocationContext context) { super(createMessage(context, t), t); }
private Object invoke(EntityViewDelegateQueryHandler delegate, EntityViewCdiQueryInvocationContext context) { try { Method extract = ClassUtils.extractPossiblyGenericMethod(delegate.getClass(), context.getMethod()); return extract.invoke(delegate, context.getMethodParameters()); } catch (InvocationTargetException e) { if (e.getCause() != null && e.getCause() instanceof PersistenceException) { throw (PersistenceException) e.getCause(); } throw new QueryInvocationException(e, context); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }
private static String createMessage(QueryInvocationContext context, Throwable t) { StringBuilder builder = new StringBuilder(createMessage(context)); builder.append("exception=").append(t.getClass()).append(",message=").append(t.getMessage()); return builder.toString(); }
private Object invoke(EntityViewDelegateQueryHandler delegate, EntityViewCdiQueryInvocationContext context) { try { Method extract = ClassUtils.extractPossiblyGenericMethod(delegate.getClass(), context.getMethod()); return extract.invoke(delegate, context.getMethodParameters()); } catch (InvocationTargetException e) { if (e.getCause() != null && e.getCause() instanceof PersistenceException) { throw (PersistenceException) e.getCause(); } throw new QueryInvocationException(e, context); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }
private Object invoke(EntityViewDelegateQueryHandler delegate, EntityViewCdiQueryInvocationContext context) { try { Method extract = ClassUtils.extractPossiblyGenericMethod(delegate.getClass(), context.getMethod()); return extract.invoke(delegate, context.getMethodParameters()); } catch (InvocationTargetException e) { if (e.getCause() != null && e.getCause() instanceof PersistenceException) { throw (PersistenceException) e.getCause(); } throw new QueryInvocationException(e, context); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }
private Object invoke(DelegateQueryHandler delegate, CdiQueryInvocationContext context) { try { Method extract = ClassUtils.extractPossiblyGenericMethod(delegate.getClass(), context.getMethod()); return extract.invoke(delegate, context.getMethodParameters()); } catch (InvocationTargetException e) { if (e.getCause() != null && e.getCause() instanceof PersistenceException) { throw (PersistenceException) e.getCause(); } throw new QueryInvocationException(e, context); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }
throw new QueryInvocationException(e, context); throw new QueryInvocationException("No DelegateQueryHandler found", context);
if (queryContext != null) throw new QueryInvocationException(e, queryContext); throw new QueryInvocationException(e, proxy.getClass(), method);
@Override public Object execute(EntityViewCdiQueryInvocationContext context) { try { EntityViewDelegateQueryHandler delegate = lookup(context); if (delegate != null) { Object result = invoke(delegate, context); if (result instanceof Collection && StreamUtils.isStreamReturned(context.getMethod())) { return StreamUtils.wrap(result); } else if (OptionalUtils.isOptionalReturned(context.getMethod())) { return OptionalUtils.wrap(result); } else { return result; } } } catch (PersistenceException e) { throw e; } catch (Exception e) { throw new QueryInvocationException(e, context); } throw new QueryInvocationException("No DelegateQueryHandler found", context); }
@Override public Object execute(EntityViewCdiQueryInvocationContext context) { try { EntityViewDelegateQueryHandler delegate = lookup(context); if (delegate != null) { Object result = invoke(delegate, context); if (result instanceof Collection && StreamUtil.isStreamReturned(context.getMethod())) { return StreamUtil.wrap(result); } else if (OptionalUtil.isOptionalReturned(context.getMethod())) { return OptionalUtil.wrap(result); } else { return result; } } } catch (PersistenceException e) { throw e; } catch (Exception e) { throw new QueryInvocationException(e, context); } throw new QueryInvocationException("No DelegateQueryHandler found", context); }
@Override public Object execute(EntityViewCdiQueryInvocationContext context) { try { EntityViewDelegateQueryHandler delegate = lookup(context); if (delegate != null) { Object result = invoke(delegate, context); if (result instanceof Collection && StreamUtil.isStreamReturned(context.getMethod())) { return StreamUtil.wrap(result); } else if (OptionalUtil.isOptionalReturned(context.getMethod())) { return OptionalUtil.wrap(result); } else { return result; } } } catch (PersistenceException e) { throw e; } catch (Exception e) { throw new QueryInvocationException(e, context); } throw new QueryInvocationException("No DelegateQueryHandler found", context); }
@Override public Object execute(EntityViewCdiQueryInvocationContext context) { try { EntityViewDelegateQueryHandler delegate = lookup(context); if (delegate != null) { Object result = invoke(delegate, context); if (result instanceof Collection && StreamUtil.isStreamReturned(context.getMethod())) { return StreamUtil.wrap(result); } else if (OptionalUtil.isOptionalReturned(context.getMethod())) { return OptionalUtil.wrap(result); } else { return result; } } } catch (PersistenceException e) { throw e; } catch (Exception e) { throw new QueryInvocationException(e, context); } throw new QueryInvocationException("No DelegateQueryHandler found", context); }
@Override public Object execute(EntityViewCdiQueryInvocationContext context) { try { EntityViewDelegateQueryHandler delegate = lookup(context); if (delegate != null) { Object result = invoke(delegate, context); if (result instanceof Collection && StreamUtils.isStreamReturned(context.getMethod())) { return StreamUtils.wrap(result); } else if (OptionalUtils.isOptionalReturned(context.getMethod())) { return OptionalUtils.wrap(result); } else { return result; } } } catch (PersistenceException e) { throw e; } catch (Exception e) { throw new QueryInvocationException(e, context); } throw new QueryInvocationException("No DelegateQueryHandler found", context); }
LOG.log(Level.FINEST, "Query execution error", e); if (queryContext != null) { throw new QueryInvocationException(e, queryContext); throw new QueryInvocationException(e, proxy.getClass(), method); } finally { if (entityManagerRef != null) {
LOG.log(Level.FINEST, "Query execution error", e); if (queryContext != null) { throw new QueryInvocationException(e, queryContext); throw new QueryInvocationException(e, proxy.getClass(), method); } finally { if (entityManagerRef != null) {