/** * Convert an array of arguments into the corresponding parameter * map, and do any PC to OID conversion necessary. */ private static boolean setParams(QueryKey key, QueryContext q, Object[] args) { if (args == null || args.length == 0) return true; // Create a map for the given parameters, and convert the // parameter list into a map, using the query's parameter // declaration to determine ordering etc. Map types = q.getParameterTypes(); Map map = new HashMap((int) (types.size() * 1.33 + 1)); int idx = 0; for (Iterator iter = types.keySet().iterator(); iter.hasNext(); idx++) map.put(iter.next(), args[idx]); return setParams(key, q.getStoreContext(), map); }
paramMap = Collections.EMPTY_MAP; else { Map paramTypes = q.getContext().getParameterTypes(); paramMap = new HashMap((int) (params.length * 1.33 + 1)); int idx = 0;