/** * Sets the values of the parameters from the given Map. The keys of the given map designate the name of the * declared parameter. */ public OpenJPAQuery<X> setParameters(Map params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); if (params != null) for (Map.Entry e : (Set<Map.Entry>) params.entrySet()) setParameter((String) e.getKey(), e.getValue()); return this; } finally { unlock(); } }
/** * Sets the values of the parameters from the given Map. The keys of the given map designate the name of the * declared parameter. */ public OpenJPAQuery<X> setParameters(Map params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); if (params != null) for (Map.Entry e : (Set<Map.Entry>) params.entrySet()) setParameter((String) e.getKey(), e.getValue()); return this; } finally { unlock(); } }
/** * Sets the values of the parameters from the given Map. The keys of the given map designate the name of the * declared parameter. */ public OpenJPAQuery<X> setParameters(Map params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); if (params != null) for (Map.Entry e : (Set<Map.Entry>) params.entrySet()) setParameter((String) e.getKey(), e.getValue()); return this; } finally { unlock(); } }
/** * Sets the values of the parameters from the given Map. The keys of the given map designate the name of the * declared parameter. */ public OpenJPAQuery<X> setParameters(Map params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); if (params != null) for (Map.Entry e : (Set<Map.Entry>) params.entrySet()) setParameter((String) e.getKey(), e.getValue()); return this; } finally { unlock(); } }
/** * Gets the value of all the named parameters. * * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. */ public Map<String, Object> getNamedParameters() { lock(); try { Map<String, Object> result = new HashMap<String, Object>(); Set<String> namedKeys = getDeclaredParameterKeys(String.class); for (String name : namedKeys) { Parameter<?> param = getParameter(name); result.put(name, isBound(param) ? getParameterValue(name) : null); } return result; } finally { unlock(); } }
/** * Gets the value of all the named parameters. * * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. */ public Map<String, Object> getNamedParameters() { lock(); try { Map<String, Object> result = new HashMap<String, Object>(); Set<String> namedKeys = getDeclaredParameterKeys(String.class); for (String name : namedKeys) { Parameter<?> param = getParameter(name); result.put(name, isBound(param) ? getParameterValue(name) : null); } return result; } finally { unlock(); } }
/** * Gets the value of all the named parameters. * * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. */ public Map<String, Object> getNamedParameters() { lock(); try { Map<String, Object> result = new HashMap<String, Object>(); Set<String> namedKeys = getDeclaredParameterKeys(String.class); for (String name : namedKeys) { Parameter<?> param = getParameter(name); result.put(name, isBound(param) ? getParameterValue(name) : null); } return result; } finally { unlock(); } }
/** * Gets the value of all the named parameters. * * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. */ public Map<String, Object> getNamedParameters() { lock(); try { Map<String, Object> result = new HashMap<String, Object>(); Set<String> namedKeys = getDeclaredParameterKeys(String.class); for (String name : namedKeys) { Parameter<?> param = getParameter(name); result.put(name, isBound(param) ? getParameterValue(name) : null); } return result; } finally { unlock(); } }
/** * Gets the array of positional parameter values. The n-th array element represents (n+1)-th positional parameter. * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. If the parameter indexing is not contiguous then the unspecified parameters * are considered as null. */ public Object[] getPositionalParameters() { lock(); try { Set<Integer> positionalKeys = getDeclaredParameterKeys(Integer.class); Object[] result = new Object[calculateMaxKey(positionalKeys)]; for (Integer pos : positionalKeys) { Parameter<?> param = getParameter(pos); result[pos.intValue() - 1] = isBound(param) ? getParameterValue(pos) : null; } return result; } finally { unlock(); } }
/** * Gets the array of positional parameter values. The n-th array element represents (n+1)-th positional parameter. * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. If the parameter indexing is not contiguous then the unspecified parameters * are considered as null. */ public Object[] getPositionalParameters() { lock(); try { Set<Integer> positionalKeys = getDeclaredParameterKeys(Integer.class); Object[] result = new Object[calculateMaxKey(positionalKeys)]; for (Integer pos : positionalKeys) { Parameter<?> param = getParameter(pos); result[pos.intValue() - 1] = isBound(param) ? getParameterValue(pos) : null; } return result; } finally { unlock(); } }
/** * Gets the array of positional parameter values. The n-th array element represents (n+1)-th positional parameter. * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. If the parameter indexing is not contiguous then the unspecified parameters * are considered as null. */ public Object[] getPositionalParameters() { lock(); try { Set<Integer> positionalKeys = getDeclaredParameterKeys(Integer.class); Object[] result = new Object[calculateMaxKey(positionalKeys)]; for (Integer pos : positionalKeys) { Parameter<?> param = getParameter(pos); result[pos.intValue() - 1] = isBound(param) ? getParameterValue(pos) : null; } return result; } finally { unlock(); } }
/** * Gets the array of positional parameter values. The n-th array element represents (n+1)-th positional parameter. * If a parameter has been declared but not bound to a value then the value is null and hence is indistinguishable * from the value being actually null. If the parameter indexing is not contiguous then the unspecified parameters * are considered as null. */ public Object[] getPositionalParameters() { lock(); try { Set<Integer> positionalKeys = getDeclaredParameterKeys(Integer.class); Object[] result = new Object[calculateMaxKey(positionalKeys)]; for (Integer pos : positionalKeys) { Parameter<?> param = getParameter(pos); result[pos.intValue() - 1] = isBound(param) ? getParameterValue(pos) : null; } return result; } finally { unlock(); } }
/** * Binds the given values as positional parameters. The n-th array element value is set to a Parameter with (n+1)-th * positional identifier. */ public OpenJPAQuery<X> setParameters(Object... params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); for (int i = 0; params != null && i < params.length; i++) { setParameter(i + 1, params[i]); } return this; } finally { unlock(); } }
/** * Binds the given values as positional parameters. The n-th array element value is set to a Parameter with (n+1)-th * positional identifier. */ public OpenJPAQuery<X> setParameters(Object... params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); for (int i = 0; params != null && i < params.length; i++) { setParameter(i + 1, params[i]); } return this; } finally { unlock(); } }
/** * Binds the given values as positional parameters. The n-th array element value is set to a Parameter with (n+1)-th * positional identifier. */ public OpenJPAQuery<X> setParameters(Object... params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); for (int i = 0; params != null && i < params.length; i++) { setParameter(i + 1, params[i]); } return this; } finally { unlock(); } }
/** * Binds the given values as positional parameters. The n-th array element value is set to a Parameter with (n+1)-th * positional identifier. */ public OpenJPAQuery<X> setParameters(Object... params) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { clearBinding(); for (int i = 0; params != null && i < params.length; i++) { setParameter(i + 1, params[i]); } return this; } finally { unlock(); } }
/** * Sets the parameter of the given name to the given value. */ public OpenJPAQuery<X> setParameter(String name, Object value) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { // native queries can not have named parameters if (isNative()) { throw new IllegalArgumentException(_loc.get("no-named-params", name, getQueryString()).toString()); } else { bindValue(getParameter(name), value); } return this; } finally { unlock(); } }
/** * Sets the parameter of the given name to the given value. */ public OpenJPAQuery<X> setParameter(String name, Object value) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { // native queries can not have named parameters if (isNative()) { throw new IllegalArgumentException(_loc.get("no-named-params", name, getQueryString()).toString()); } else { bindValue(getParameter(name), value); } return this; } finally { unlock(); } }
/** * Sets the parameter of the given name to the given value. */ public OpenJPAQuery<X> setParameter(String name, Object value) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { // native queries can not have named parameters if (isNative()) { throw new IllegalArgumentException(_loc.get("no-named-params", name, getQueryString()).toString()); } else { bindValue(getParameter(name), value); } return this; } finally { unlock(); } }
/** * Sets the parameter of the given name to the given value. */ public OpenJPAQuery<X> setParameter(String name, Object value) { assertOpen(); _em.assertNotCloseInvoked(); lock(); try { // native queries can not have named parameters if (isNative()) { throw new IllegalArgumentException(_loc.get("no-named-params", name, getQueryString()).toString()); } else { bindValue(getParameter(name), value); } return this; } finally { unlock(); } }