/** * Affirms if declared parameters use position identifier. */ public boolean hasPositionalParameters() { return !getDeclaredParameterKeys(Integer.class).isEmpty(); }
/** * Affirms if declared parameters use position identifier. */ public boolean hasPositionalParameters() { return !getDeclaredParameterKeys(Integer.class).isEmpty(); }
/** * Affirms if declared parameters use position identifier. */ public boolean hasPositionalParameters() { return !getDeclaredParameterKeys(Integer.class).isEmpty(); }
/** * Affirms if declared parameters use position identifier. */ public boolean hasPositionalParameters() { return !getDeclaredParameterKeys(Integer.class).isEmpty(); }
public <T> Set<T> getDeclaredParameterKeys(Class<T> keyType) { Set<T> result = new HashSet<T>(); for (Object key : getDeclaredParameterKeys()) { if (keyType.isInstance(key)) result.add((T) key); } return result; }
public <T> Set<T> getDeclaredParameterKeys(Class<T> keyType) { Set<T> result = new HashSet<T>(); for (Object key : getDeclaredParameterKeys()) { if (keyType.isInstance(key)) result.add((T) key); } return result; }
public <T> Set<T> getDeclaredParameterKeys(Class<T> keyType) { Set<T> result = new HashSet<T>(); for (Object key : getDeclaredParameterKeys()) { if (keyType.isInstance(key)) result.add((T) key); } return result; }
public <T> Set<T> getDeclaredParameterKeys(Class<T> keyType) { Set<T> result = new HashSet<T>(); for (Object key : getDeclaredParameterKeys()) { if (keyType.isInstance(key)) result.add((T) key); } return result; }
/** * Get the positional parameter with the given position. The parameter may just have been declared and not bound to * a value. * * @param position * specified in the user query. * @return parameter object * @throws IllegalArgumentException * if the parameter with the given position does not exist */ public Parameter<?> getParameter(int pos) { if (_convertPositionalParams == true) { return getParameter("_" + String.valueOf(pos)); } Parameter<?> param = getDeclaredParameters().get(pos); if (param == null) throw new IllegalArgumentException(_loc.get("param-missing-pos", pos, getQueryString(), getDeclaredParameterKeys()).getMessage()); return param; }
/** * Get the positional parameter with the given position. The parameter may just have been declared and not bound to * a value. * * @param position * specified in the user query. * @return parameter object * @throws IllegalArgumentException * if the parameter with the given position does not exist */ public Parameter<?> getParameter(int pos) { if (_convertPositionalParams == true) { return getParameter("_" + String.valueOf(pos)); } Parameter<?> param = getDeclaredParameters().get(pos); if (param == null) throw new IllegalArgumentException(_loc.get("param-missing-pos", pos, getQueryString(), getDeclaredParameterKeys()).getMessage()); return param; }
/** * Get the positional parameter with the given position. The parameter may just have been declared and not bound to * a value. * * @param position * specified in the user query. * @return parameter object * @throws IllegalArgumentException * if the parameter with the given position does not exist */ public Parameter<?> getParameter(int pos) { if (_convertPositionalParams == true) { return getParameter("_" + String.valueOf(pos)); } Parameter<?> param = getDeclaredParameters().get(pos); if (param == null) throw new IllegalArgumentException(_loc.get("param-missing-pos", pos, getQueryString(), getDeclaredParameterKeys()).getMessage()); return param; }
/** * Get the positional parameter with the given position. The parameter may just have been declared and not bound to * a value. * * @param position * specified in the user query. * @return parameter object * @throws IllegalArgumentException * if the parameter with the given position does not exist */ public Parameter<?> getParameter(int pos) { if (_convertPositionalParams == true) { return getParameter("_" + String.valueOf(pos)); } Parameter<?> param = getDeclaredParameters().get(pos); if (param == null) throw new IllegalArgumentException(_loc.get("param-missing-pos", pos, getQueryString(), getDeclaredParameterKeys()).getMessage()); return param; }
/** * 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(); } }