public void printParameter(DatabaseField field) { getCall().appendTranslation(getWriter(), field); }
public void printParameter(DatabaseField field) { getCall().appendTranslation(getWriter(), field); }
public void printParameter(DatabaseField field) { getCall().appendTranslation(getWriter(), field); }
public void printValuelist(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printList(Collection values) { try { getWriter().write("("); Iterator valuesEnum = values.iterator(); while (valuesEnum.hasNext()) { Object value = valuesEnum.next(); if (value instanceof Expression){ ((Expression)value).printSQL(this); }else{ session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); } if (valuesEnum.hasNext()) { getWriter().write(", "); } } getWriter().write(")"); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
/** * Print the sub query to the printer. */ protected void printCustomSQL(ExpressionSQLPrinter printer) { /* * modified for bug#2658466. This fix ensures that Custom SQL sub-queries are translated * and have variables substituted with values correctly. */ SQLCall call = (SQLCall)getSubQuery().getCall(); call.translateCustomQuery(); printer.getCall().getParameters().addAll(call.getParameters()); printer.getCall().getParameterTypes().addAll(call.getParameterTypes()); printer.printString(call.getCallString()); }
/** * Print the sub query to the printer. */ protected void printCustomSQL(ExpressionSQLPrinter printer) { /* * modified for bug#2658466. This fix ensures that Custom SQL sub-queries are translated * and have variables substituted with values correctly. */ SQLCall call = (SQLCall)getSubQuery().getCall(); call.translateCustomQuery(); printer.getCall().getParameters().addAll(call.getParameters()); printer.getCall().getParameterTypes().addAll(call.getParameterTypes()); printer.printString(call.getCallString()); }
/** * Print the sub query to the printer. */ protected void printCustomSQL(ExpressionSQLPrinter printer) { /* * modified for bug#2658466. This fix ensures that Custom SQL sub-queries are translated * and have variables substituted with values correctly. */ SQLCall call = (SQLCall)getSubQuery().getCall(); call.translateCustomQuery(); printer.getCall().getParameters().addAll(call.getParameters()); printer.getCall().getParameterTypes().addAll(call.getParameterTypes()); printer.printString(call.getCallString()); }
public void printPrimitive(Object value) { if (value instanceof Collection) { printValuelist((Collection)value); return; } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); }
public void printPrimitive(Object value) { if (value instanceof Collection) { printValuelist((Collection)value); return; } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); }
public void printPrimitive(Object value) { if (value instanceof Collection) { printValuelist((Collection)value); return; } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), value); }
public void printParameter(ParameterExpression expression) { try { getCall().appendTranslationParameter(getWriter(), expression, getPlatform(), getTranslationRow()); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printParameter(ParameterExpression expression) { try { getCall().appendTranslationParameter(getWriter(), expression, getPlatform(), getTranslationRow()); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printParameter(ParameterExpression expression) { try { getCall().appendTranslationParameter(getWriter(), expression, getPlatform(), getTranslationRow()); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printNull(ConstantExpression nullValueExpression) { if(session.getPlatform().shouldBindLiterals()) { DatabaseField field = null; Expression localBase = nullValueExpression.getLocalBase(); if(localBase != null && (localBase.isFieldExpression() || localBase.isQueryKeyExpression())) { field = ((DataExpression)localBase).getField(); } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), field); } else { session.getPlatform().appendLiteralToCall(getCall(), getWriter(), null); } }
public void printNull(ConstantExpression nullValueExpression) { if(session.getPlatform().shouldBindLiterals()) { DatabaseField field = null; Expression localBase = nullValueExpression.getLocalBase(); if(localBase.isFieldExpression()) { field = ((FieldExpression)localBase).getField(); } else if(localBase.isQueryKeyExpression()) { field = ((QueryKeyExpression)localBase).getField(); } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), field); } else { session.getPlatform().appendLiteralToCall(getCall(), getWriter(), null); } }
public void printNull(ConstantExpression nullValueExpression) { if(session.getPlatform().shouldBindLiterals()) { DatabaseField field = null; Expression localBase = nullValueExpression.getLocalBase(); if(localBase.isFieldExpression()) { field = ((FieldExpression)localBase).getField(); } else if(localBase.isQueryKeyExpression()) { field = ((QueryKeyExpression)localBase).getField(); } session.getPlatform().appendLiteralToCall(getCall(), getWriter(), field); } else { session.getPlatform().appendLiteralToCall(getCall(), getWriter(), null); } }
/** * INTERNAL: * Print SQL */ public void printSQL(ExpressionSQLPrinter printer) { // If both sides are parameters, some databases don't allow binding. if (printer.getPlatform().isDynamicSQLRequiredForFunctions() && ((this.firstChild.isParameterExpression() || this.firstChild.isConstantExpression()) && (this.secondChild.isParameterExpression() || this.secondChild.isConstantExpression()))) { printer.getCall().setUsesBinding(false); } if (isEqualNull(printer)) { this.firstChild.isNull().printSQL(printer); } else if (isNotEqualNull(printer)) { this.firstChild.notNull().printSQL(printer); } else { super.printSQL(printer); } }
/** * INTERNAL: * Print SQL */ public void printSQL(ExpressionSQLPrinter printer) { // If both sides are parameters, some databases don't allow binding. if (printer.getPlatform().isDynamicSQLRequiredForFunctions() && ((this.firstChild.isParameterExpression() || this.firstChild.isConstantExpression()) && (this.secondChild.isParameterExpression() || this.secondChild.isConstantExpression()))) { printer.getCall().setUsesBinding(false); } if (isEqualNull(printer)) { this.firstChild.isNull().printSQL(printer); } else if (isNotEqualNull(printer)) { this.firstChild.notNull().printSQL(printer); } else { super.printSQL(printer); } }
/** * INTERNAL: * Print SQL */ public void printSQL(ExpressionSQLPrinter printer) { // If both sides are parameters, some databases don't allow binding. if (printer.getPlatform().isDynamicSQLRequiredForFunctions() && ((this.firstChild.isParameterExpression() || this.firstChild.isConstantExpression()) && (this.secondChild.isParameterExpression() || this.secondChild.isConstantExpression()))) { printer.getCall().setUsesBinding(false); } if (isEqualNull(printer)) { this.firstChild.isNull().printSQL(printer); } else if (isNotEqualNull(printer)) { this.firstChild.notNull().printSQL(printer); } else { super.printSQL(printer); } }