public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { appendTo(sel, ctx, state, sql, index, null); }
private Object handleArgsVal(Object value, Object ob, Object[] params, OpenJPAStateManager sm) { org.apache.openjpa.jdbc.kernel.exps.Args argsVal = (org.apache.openjpa.jdbc.kernel.exps.Args) value; return argsVal.getValues(); }
private FilterValue[] getArgs(Select sel, ExpContext ctx, ExpState state) { if (_arg == null) return null; if (_arg instanceof Args) return ((Args) _arg).newFilterValues(sel, ctx, state); return new FilterValue[]{ new FilterValueImpl(sel, ctx, state, _arg) }; }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { Args args = (Args) getValue(); if (!ctx.store.getDBDictionary().requiresCastForMathFunctions || args.getValues().length == 1) { super.appendTo(sel, ctx, state, sql, index); } else { sql.append(getOperator()); sql.append("("); args.appendTo(sel, ctx, state, sql, 0, getOperator()); sql.append(")"); } } }
private Class[] getArgTypes() { if (_arg == null) return null; if (_arg instanceof Args) return ((Args) _arg).getTypes(); return new Class[]{ _arg.getType() }; }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { sql.append(getOperator()); sql.append(_noParen ? " " : "("); _val.appendTo(sel, ctx, state, sql, 0); // OPENJPA-2149: If _val (Val) is an 'Arg', we need to get the Val[] // from it, and the single element it contains because the // 'addCastForParam' method gets the 'type' from the Val it receives. // In the case where _val is an Arg, when addCastForParam gets the // type, it will be getting the type of the Val (an Object) rather // the type of the Arg. sql.addCastForParam(getOperator(), (_val instanceof Args) ? (((Args) _val).getVals())[0] : _val); if (!_noParen) sql.append(")"); }
private FilterValue[] getArgs(Select sel, ExpContext ctx, ExpState state) { if (_arg == null) return null; if (_arg instanceof Args) return ((Args) _arg).newFilterValues(sel, ctx, state); return new FilterValue[] { new FilterValueImpl(sel, ctx, state, _arg) }; }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { Args args = (Args) getValue(); if (!ctx.store.getDBDictionary().requiresCastForMathFunctions || args.getValues().length == 1) { super.appendTo(sel, ctx, state, sql, index); } else { sql.append(getOperator()); sql.append("("); args.appendTo(sel, ctx, state, sql, 0, getOperator()); sql.append(")"); } } }
private Class[] getArgTypes() { if (_arg == null) return null; if (_arg instanceof Args) return ((Args) _arg).getTypes(); return new Class[]{ _arg.getType() }; }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { sql.append(getOperator()); sql.append(_noParen ? " " : "("); _val.appendTo(sel, ctx, state, sql, 0); // OPENJPA-2149: If _val (Val) is an 'Arg', we need to get the Val[] // from it, and the single element it contains because the // 'addCastForParam' method gets the 'type' from the Val it receives. // In the case where _val is an Arg, when addCastForParam gets the // type, it will be getting the type of the Val (an Object) rather // the type of the Arg. sql.addCastForParam(getOperator(), (_val instanceof Args) ? (((Args) _val).getVals())[0] : _val); if (!_noParen) sql.append(")"); }
private FilterValue[] getArgs(Select sel, ExpContext ctx, ExpState state) { if (_arg == null) return null; if (_arg instanceof Args) return ((Args) _arg).newFilterValues(sel, ctx, state); return new FilterValue[]{ new FilterValueImpl(sel, ctx, state, _arg) }; }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { Args args = (Args) getValue(); if (!ctx.store.getDBDictionary().requiresCastForMathFunctions || args.getValues().length == 1) { super.appendTo(sel, ctx, state, sql, index); } else { sql.append(getOperator()); sql.append("("); args.appendTo(sel, ctx, state, sql, 0, getOperator()); sql.append(")"); } } }
private Class[] getArgTypes() { if (_arg == null) return null; if (_arg instanceof Args) return ((Args) _arg).getTypes(); return new Class[]{ _arg.getType() }; }
private Object handleArgsVal(Object value, Object ob, Object[] params, OpenJPAStateManager sm) { org.apache.openjpa.jdbc.kernel.exps.Args argsVal = (org.apache.openjpa.jdbc.kernel.exps.Args) value; return argsVal.getValues(); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { appendTo(sel, ctx, state, sql, index, null); }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { sql.append(getOperator()); sql.append(_noParen ? " " : "("); _val.appendTo(sel, ctx, state, sql, 0); // OPENJPA-2149: If _val (Val) is an 'Arg', we need to get the Val[] // from it, and the single element it contains because the // 'addCastForParam' method gets the 'type' from the Val it receives. // In the case where _val is an Arg, when addCastForParam gets the // type, it will be getting the type of the Val (an Object) rather // the type of the Arg. sql.addCastForParam(getOperator(), (_val instanceof Args) ? (((Args) _val).getVals())[0] : _val); if (!_noParen) sql.append(")"); }
private FilterValue[] getArgs(Select sel, ExpContext ctx, ExpState state) { if (_arg == null) return null; if (_arg instanceof Args) return ((Args) _arg).newFilterValues(sel, ctx, state); return new FilterValue[]{ new FilterValueImpl(sel, ctx, state, _arg) }; }
public void appendTo(Select sel, ExpContext ctx, ExpState state, SQLBuffer sql, int index) { Args args = (Args) getValue(); if (!ctx.store.getDBDictionary().requiresCastForMathFunctions || args.getValues().length == 1) { super.appendTo(sel, ctx, state, sql, index); } else { sql.append(getOperator()); sql.append("("); args.appendTo(sel, ctx, state, sql, 0, getOperator()); sql.append(")"); } } }