public Object parse(String ql, ExpressionStoreQuery query) { if (query.getContext().getParameterDeclaration() != null) throw new UserException(_loc.get("param-decs-invalid")); return new JPQLExpressionBuilder.ParsedJPQL(ql); }
/** * Parse the parameter declarations. */ private LinkedMap bindParameterTypes() { ctx.lock(); try { if (_params != null) return _params; String params = ctx.getParameterDeclaration(); if (params == null) return EMPTY_PARAMS; List decs = Filters.parseDeclaration(params, ',', "parameters"); if (_params == null) _params = new LinkedMap((int) (decs.size() / 2 * 1.33 + 1)); String name; Class cls; for (int i = 0; i < decs.size(); i += 2) { name = (String) decs.get(i); cls = ctx.classForName(name, null); if (cls == null) throw new UserException(_loc.get("bad-param-type", name)); _params.put(decs.get(i + 1), cls); } return _params; } finally { ctx.unlock(); } }
/** * Parse the parameter declarations. */ private OrderedMap<Object, Class<?>> bindParameterTypes() { ctx.lock(); try { if (_params != null) return _params; String params = ctx.getParameterDeclaration(); if (params == null) return EMPTY_ORDERED_PARAMS; List decs = Filters.parseDeclaration(params, ',', "parameters"); if (_params == null) _params = new OrderedMap<Object, Class<?>>(); String name; Class cls; for (int i = 0; i < decs.size(); i += 2) { name = (String) decs.get(i); cls = ctx.classForName(name, null); if (cls == null) throw new UserException(_loc.get("bad-param-type", name)); _params.put(decs.get(i + 1), cls); } return _params; } finally { ctx.unlock(); } }
/** * Parse the parameter declarations. */ private OrderedMap<Object, Class<?>> bindParameterTypes() { ctx.lock(); try { if (_params != null) return _params; String params = ctx.getParameterDeclaration(); if (params == null) return EMPTY_ORDERED_PARAMS; List decs = Filters.parseDeclaration(params, ',', "parameters"); if (_params == null) _params = new OrderedMap<Object, Class<?>>(); String name; Class cls; for (int i = 0; i < decs.size(); i += 2) { name = (String) decs.get(i); cls = ctx.classForName(name, null); if (cls == null) throw new UserException(_loc.get("bad-param-type", name)); _params.put(decs.get(i + 1), cls); } return _params; } finally { ctx.unlock(); } }
/** * Parse the parameter declarations. */ private OrderedMap<Object, Class<?>> bindParameterTypes() { ctx.lock(); try { if (_params != null) return _params; String params = ctx.getParameterDeclaration(); if (params == null) return EMPTY_ORDERED_PARAMS; List decs = Filters.parseDeclaration(params, ',', "parameters"); if (_params == null) _params = new OrderedMap<Object, Class<?>>(); String name; Class cls; for (int i = 0; i < decs.size(); i += 2) { name = (String) decs.get(i); cls = ctx.classForName(name, null); if (cls == null) throw new UserException(_loc.get("bad-param-type", name)); _params.put(decs.get(i + 1), cls); } return _params; } finally { ctx.unlock(); } }
/** * Parse the parameter declarations. */ private OrderedMap<Object, Class<?>> bindParameterTypes() { ctx.lock(); try { if (_params != null) return _params; String params = ctx.getParameterDeclaration(); if (params == null) return EMPTY_ORDERED_PARAMS; List decs = Filters.parseDeclaration(params, ',', "parameters"); if (_params == null) _params = new OrderedMap<Object, Class<?>>(); String name; Class cls; for (int i = 0; i < decs.size(); i += 2) { name = (String) decs.get(i); cls = ctx.classForName(name, null); if (cls == null) throw new UserException(_loc.get("bad-param-type", name)); _params.put(decs.get(i + 1), cls); } return _params; } finally { ctx.unlock(); } }
public Object parse(String ql, ExpressionStoreQuery query) { if (query.getContext().getParameterDeclaration() != null) throw new UserException(_loc.get("param-decs-invalid")); try { return new JPQLExpressionBuilder.ParsedJPQL(ql); } catch (ParseException e) { throw new ParseException(_loc.get("jpql-parse-error", ql, e.getMessage()).getMessage(), e); } }
public Object parse(String ql, ExpressionStoreQuery query) { if (query.getContext().getParameterDeclaration() != null) throw new UserException(_loc.get("param-decs-invalid")); try { return new JPQLExpressionBuilder.ParsedJPQL(ql); } catch (ParseException e) { throw new ParseException(_loc.get("jpql-parse-error", ql, e.getMessage()).getMessage(), e); } }
public Object parse(String ql, ExpressionStoreQuery query) { if (query.getContext().getParameterDeclaration() != null) throw new UserException(_loc.get("param-decs-invalid")); try { return new JPQLExpressionBuilder.ParsedJPQL(ql); } catch (ParseException e) { throw new ParseException(_loc.get("jpql-parse-error", ql, e.getMessage()).getMessage(), e); } }
public Object parse(String ql, ExpressionStoreQuery query) { if (query.getContext().getParameterDeclaration() != null) throw new UserException(_loc.get("param-decs-invalid")); try { return new JPQLExpressionBuilder.ParsedJPQL(ql); } catch (ParseException e) { throw new ParseException(_loc.get("jpql-parse-error", ql, e.getMessage()).getMessage(), e); } }