org.eclipse.datatools.sqltools.sqlbuilder.model
Class DeleteHelper

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqlbuilder.model.DeleteHelper

public class DeleteHelper
extends java.lang.Object

Helper class for DeleteStatement


Constructor Summary
DeleteHelper()
           
 
Method Summary
static void clearStatementContents(QueryDeleteStatement stmt)
          Clears the contents of the given delete statement.Containments which are objects, are set to null and containments which are lists, are cleared.
static void refresh(QueryDeleteStatement stmt)
          Refreshes the model that ultimately refreseh the UI, this is temporary.
static void removeTableFromStatement(QueryDeleteStatement statement)
          Sets the target table of the given delete statement to null
static void replaceStatementContents(QueryDeleteStatement oldStmt, QueryDeleteStatement newStmt)
          Replaces the containments in one insert statement with the containments in another delete statement
static void setTargetTable(QueryDeleteStatement statement, TableInDatabase targetTable)
          Sets the target TableExpression of the given Delete statement
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteHelper

public DeleteHelper()
Method Detail

removeTableFromStatement

public static void removeTableFromStatement(QueryDeleteStatement statement)
Sets the target table of the given delete statement to null

Parameters:
statement - the statement to be modified

setTargetTable

public static void setTargetTable(QueryDeleteStatement statement,
                                  TableInDatabase targetTable)
Sets the target TableExpression of the given Delete statement

Parameters:
statement - the statement to be modified
targetTable - the new TargetTableExpression

clearStatementContents

public static void clearStatementContents(QueryDeleteStatement stmt)
Clears the contents of the given delete statement.Containments which are objects, are set to null and containments which are lists, are cleared.

Parameters:
stmt - the statement being modified

replaceStatementContents

public static void replaceStatementContents(QueryDeleteStatement oldStmt,
                                            QueryDeleteStatement newStmt)
Replaces the containments in one insert statement with the containments in another delete statement

Parameters:
oldStmt - statement in which the containments are being replaced
newStmt - statement whose contents are used to replace contents in oldStmt

refresh

public static void refresh(QueryDeleteStatement stmt)
Refreshes the model that ultimately refreseh the UI, this is temporary.

Parameters:
stmt - the QueryDeleteStatement which needs to be refreshed