/** * Executes this receiver by delegation to the underlying executable query. * <br> * This method is multi-call safe. The underlying executable query is executed * <em>only</em> for the first invocation. Subsequent */ @Override public boolean execute() { if (_callback == null) { _callback = (QueryResultCallback) getExecutableQuery().execute(_delegate.getParameterValues()); } return _callback.getExecutionResult(); }
/** * Executes this receiver by delegation to the underlying executable query. * <br> * This method is multi-call safe. The underlying executable query is executed * <em>only</em> for the first invocation. Subsequent */ @Override public boolean execute() { if (_callback == null) { _callback = (QueryResultCallback) getExecutableQuery().execute(_delegate.getParameterValues()); } return _callback.getExecutionResult(); }
public int executeUpdate() { _em.assertNotCloseInvoked(); Map<?,?> paramValues = getParameterValues(); if (_query.getOperation() == QueryOperations.OP_DELETE) { return asInt(paramValues.isEmpty() ? _query.deleteAll() : _query.deleteAll(paramValues)); } if (_query.getOperation() == QueryOperations.OP_UPDATE) { return asInt(paramValues.isEmpty() ? _query.updateAll() : _query.updateAll(paramValues)); } throw new InvalidStateException(_loc.get("not-update-delete-query", getQueryString()), null, null, false); }
public int executeUpdate() { _em.assertNotCloseInvoked(); Map<?,?> paramValues = getParameterValues(); if (_query.getOperation() == QueryOperations.OP_DELETE) { return asInt(paramValues.isEmpty() ? _query.deleteAll() : _query.deleteAll(paramValues)); } if (_query.getOperation() == QueryOperations.OP_UPDATE) { return asInt(paramValues.isEmpty() ? _query.updateAll() : _query.updateAll(paramValues)); } throw new InvalidStateException(_loc.get("not-update-delete-query", getQueryString()), null, null, false); }
public int executeUpdate() { _em.assertNotCloseInvoked(); Map<?,?> paramValues = getParameterValues(); if (_query.getOperation() == QueryOperations.OP_DELETE) { return asInt(paramValues.isEmpty() ? _query.deleteAll() : _query.deleteAll(paramValues)); } if (_query.getOperation() == QueryOperations.OP_UPDATE) { return asInt(paramValues.isEmpty() ? _query.updateAll() : _query.updateAll(paramValues)); } throw new InvalidStateException(_loc.get("not-update-delete-query", getQueryString()), null, null, false); }
public int executeUpdate() { _em.assertNotCloseInvoked(); Map<?,?> paramValues = getParameterValues(); if (_query.getOperation() == QueryOperations.OP_DELETE) { return asInt(paramValues.isEmpty() ? _query.deleteAll() : _query.deleteAll(paramValues)); } if (_query.getOperation() == QueryOperations.OP_UPDATE) { return asInt(paramValues.isEmpty() ? _query.updateAll() : _query.updateAll(paramValues)); } throw new InvalidStateException(_loc.get("not-update-delete-query", getQueryString()), null, null, false); }
private Object execute() { if (!isNative() && _query.getOperation() != QueryOperations.OP_SELECT) throw new InvalidStateException(_loc.get("not-select-query", getQueryString()), null, null, false); try { lock(); Map params = getParameterValues(); boolean registered = preExecute(params); Object result = _query.execute(params); if (registered) { postExecute(result); } return result; } catch (LockTimeoutException e) { throw new QueryTimeoutException(e.getMessage(), new Throwable[]{e}, this); } finally { unlock(); } }
private Object execute() { if (!isNative() && _query.getOperation() != QueryOperations.OP_SELECT) throw new InvalidStateException(_loc.get("not-select-query", getQueryString()), null, null, false); try { lock(); Map params = getParameterValues(); boolean registered = preExecute(params); Object result = _query.execute(params); if (registered) { postExecute(result); } return result; } catch (LockTimeoutException e) { throw new QueryTimeoutException(e.getMessage(), new Throwable[]{e}, this); } finally { unlock(); } }
private Object execute() { if (!isNative() && _query.getOperation() != QueryOperations.OP_SELECT) throw new InvalidStateException(_loc.get("not-select-query", getQueryString()), null, null, false); try { lock(); Map params = getParameterValues(); boolean registered = preExecute(params); Object result = _query.execute(params); if (registered) { postExecute(result); } return result; } catch (LockTimeoutException e) { throw new QueryTimeoutException(e.getMessage(), new Throwable[]{e}, this); } finally { unlock(); } }
private Object execute() { if (!isNative() && _query.getOperation() != QueryOperations.OP_SELECT) throw new InvalidStateException(_loc.get("not-select-query", getQueryString()), null, null, false); try { lock(); Map params = getParameterValues(); boolean registered = preExecute(params); Object result = _query.execute(params); if (registered) { postExecute(result); } return result; } catch (LockTimeoutException e) { throw new QueryTimeoutException(e.getMessage(), new Throwable[]{e}, this); } finally { unlock(); } }