FileDocCategorySizeDatePackage
SQLDeleteStatement.javaAPI DocGlassfish v2 API3421Tue May 22 16:54:32 BST 2007oracle.toplink.essentials.internal.expressions

SQLDeleteStatement

public class SQLDeleteStatement extends SQLModifyStatement

Purpose: Print DELETE statement.

Responsibilities:

  • Print DELETE statement.
author
Dorin Sandu
since
TOPLink/Java 1.0

Fields Summary
Constructors Summary
Methods Summary
public oracle.toplink.essentials.internal.databaseaccess.DatabaseCallbuildCall(oracle.toplink.essentials.internal.sessions.AbstractSession session)
Append the string containing the SQL insert string for the given table.

        SQLCall call = new SQLCall();
        call.returnNothing();

        Writer writer = new CharArrayWriter(100);
        try {
            writer.write("DELETE ");
            writer.write("FROM ");
            writer.write(getTable().getQualifiedName());

            if (getWhereClause() != null) {
                writer.write(" WHERE ");
                ExpressionSQLPrinter printer = new ExpressionSQLPrinter(session, getTranslationRow(), call, false);
                printer.setWriter(writer);
                printer.printExpression(getWhereClause());
            }

            call.setSQLString(writer.toString());
        } catch (IOException exception) {
            throw ValidationException.fileError(exception);
        }
        return call;