public void printString(String value) { try { getWriter().write(value); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
public void printString(String value) { try { getWriter().write(value); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
@Override public String getArgument(int index) { String argumentString = argumentStrings[index]; if (argumentString == null) { StringWriter writer = (StringWriter) expressionSQLPrinter.getWriter(); writer.getBuffer().setLength(0); arguments.get(index).printSQL(expressionSQLPrinter); argumentStrings[index] = argumentString = writer.toString(); } return argumentString; }
@Override public String getArgument(int index) { String argumentString = argumentStrings[index]; if (argumentString == null) { StringWriter writer = (StringWriter) expressionSQLPrinter.getWriter(); writer.getBuffer().setLength(0); arguments.get(index).printSQL(expressionSQLPrinter); argumentStrings[index] = argumentString = writer.toString(); } return argumentString; }
public void printString(String value) { try { getWriter().write(value); } catch (IOException exception) { throw ValidationException.fileError(exception); } }
@SuppressWarnings("unchecked") private String printOmittingForUpdate(SQLSelectStatement statement, ExpressionSQLPrinter printer, Vector fields) { boolean originalShouldPrintForUpdate = this.shouldPrintForUpdateClause; Writer originalWriter = printer.getWriter(); this.shouldPrintForUpdateClause = false; printer.setWriter(new StringWriter()); fields.addAll(statement.printSQL(printer)); String query = printer.getWriter().toString(); this.shouldPrintForUpdateClause = originalShouldPrintForUpdate; printer.setWriter(originalWriter); return query; }
/** * Print the table's SQL from clause. */ public void printSQL(ExpressionSQLPrinter printer) throws IOException { printer.getWriter().write(getQualifiedNameDelimited(printer.getPlatform())); }
/** * Print the table's SQL from clause. */ public void printSQL(ExpressionSQLPrinter printer) throws IOException { printer.getWriter().write(getQualifiedNameDelimited(printer.getPlatform())); }
public void printParameter(DatabaseField field) { getCall().appendTranslation(getWriter(), field); }
/** * Print the outer join ON clause. * Some databases do not allow brackets. */ protected void printOnClause(Expression onClause, ExpressionSQLPrinter printer, DatabasePlatform platform) throws IOException { printer.getWriter().write(" ON "); if (!platform.supportsOuterJoinsWithBrackets()) { ((RelationExpression)onClause).printSQLNoParens(printer); } else { onClause.printSQL(printer); } }
/** * Print the outer join ON clause. * Some databases do not allow brackets. */ protected void printOnClause(Expression onClause, ExpressionSQLPrinter printer, DatabasePlatform platform) throws IOException { printer.getWriter().write(" ON "); if (!platform.supportsOuterJoinsWithBrackets()) { ((RelationExpression)onClause).printSQLNoParens(printer); } else { onClause.printSQL(printer); } }
/** * Print the outer join ON clause. * Some databases do not allow brackets. */ protected void printOnClause(Expression onClause, ExpressionSQLPrinter printer, DatabasePlatform platform) throws IOException { printer.getWriter().write(" ON "); if (!platform.supportsOuterJoinsWithBrackets()) { ((RelationExpression)onClause).printSQLNoParens(printer); } else { onClause.printSQL(printer); } }
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); } }