| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.datatools.sqltools.sqlbuilder.model.InsertHelper
public class InsertHelper
Helper class for InsertStatement
| Constructor Summary | |
|---|---|
| InsertHelper() | |
| Method Summary | |
|---|---|
| static void | addColumn(org.eclipse.emf.edit.domain.EditingDomain editDomain,
          QueryInsertStatement statement,
          Column column)Adds the given column to the target list of columns in the given insert statement. | 
| static void | addDefaultInsertValue(org.eclipse.emf.edit.domain.EditingDomain editDomain,
                      QueryInsertStatement statement,
                      Column column)Adds a default value for the given column in the given insert statement. | 
| static void | addInsertColumnValuePair(QueryInsertStatement insertStmt,
                         ValueExpressionColumn column,
                         QueryValueExpression valueExpr)Adds the given column and value to the given insert statement. | 
| static void | addInsertQuery(QueryInsertStatement insertStmt)Adds an empty query expresion to the insert statement. | 
| static void | addOrReplaceTargetTable(TableInDatabase targetTable,
                        QueryInsertStatement stmt)Adds or replaces the target table in the given statement with the given table expression. | 
| static void | clearStatementContents(QueryInsertStatement stmt)Clears the contents of the given insert statement.Containments which are objects, are set to null and containments which are lists, are cleared. | 
| static ValueExpressionColumn | getColumnExpressionForName(QueryInsertStatement insertStmt,
                           java.lang.String columnName)Returns the SQLValueExpressionColumn in the givern insert statement, which has the given name. | 
| static QueryValueExpression | getInsertValueforColumn(QueryInsertStatement insertStmt,
                        ValueExpressionColumn colExpr)Returns the SQLValueExpression from the first row of insert values in the given statement, corresponding to the given column, | 
| static void | refresh(QueryInsertStatement insert)Temporary to method to refresh the viewers in cases where notification does not work | 
| static void | removeAllColumnsAndValues(QueryInsertStatement stmt) | 
| static void | removeColumn(QueryInsertStatement statement,
             Column column)Removes the given Column and its value from the given insert statement | 
| static void | removeColumn(QueryInsertStatement statement,
             ValueExpressionColumn removedColumn)Removes the given ValueExpressionColumn and its value from the given insert statement | 
| static void | removeTableFromStatement(QueryInsertStatement statement)Removes the target table from the given statement. | 
| static void | replaceColumn(QueryInsertStatement insertStmt,
              ValueExpressionColumn oldColumn,
              ValueExpressionColumn newColumn)Replaces an existing column in the insert statement with a new column. | 
| static void | replaceStatementContents(QueryInsertStatement oldStmt,
                         QueryInsertStatement newStmt)Replaces the containments in one insert statement with the containments in another insert statement | 
| static void | setTargetTable(QueryInsertStatement statement,
               TableInDatabase targetTable)Sets the target TableExpression of the given Insert statement | 
| static void | updateInsertValueForColumn(QueryInsertStatement insertStmt,
                           ValueExpressionColumn column,
                           QueryValueExpression valueExpr)Updates the insert value of the column in the given insert statement. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public InsertHelper()
| Method Detail | 
|---|
public static void addColumn(org.eclipse.emf.edit.domain.EditingDomain editDomain,
                             QueryInsertStatement statement,
                             Column column)
editDomain - the current editing domain (command processor)statement - the statement to which the column is addedcolumn - the column being added
public static void removeColumn(QueryInsertStatement statement,
                                Column column)
statement - the given insert statementcolumn - the column to be removedpublic static void refresh(QueryInsertStatement insert)
insert - 
public static void removeColumn(QueryInsertStatement statement,
                                ValueExpressionColumn removedColumn)
statement - the given insert statementremovedColumn - the ValueExpressionColumn to be removed
public static void addDefaultInsertValue(org.eclipse.emf.edit.domain.EditingDomain editDomain,
                                         QueryInsertStatement statement,
                                         Column column)
editDomain - the current editing domain (command processor)statement - the insert statementcolun - the column for which the value is to be addedpublic static void addInsertQuery(QueryInsertStatement insertStmt)
insertStmt - the statement to be modifiedpublic static void clearStatementContents(QueryInsertStatement stmt)
public static void removeAllColumnsAndValues(QueryInsertStatement stmt)
public static void updateInsertValueForColumn(QueryInsertStatement insertStmt,
                                              ValueExpressionColumn column,
                                              QueryValueExpression valueExpr)
insertStmt - the insert statement to be updatedcolumn - the column for which the value is updatedvalueExpr - the new value
public static void addInsertColumnValuePair(QueryInsertStatement insertStmt,
                                            ValueExpressionColumn column,
                                            QueryValueExpression valueExpr)
insertStmt - the insert statement , to which the column and the value are
            addedcolumn - the column being addedvalueExpr - the value for the column
public static void replaceColumn(QueryInsertStatement insertStmt,
                                 ValueExpressionColumn oldColumn,
                                 ValueExpressionColumn newColumn)
insertStmt - the insert statement to be modifiedoldColumn - the column being replacednewColumn - the column which replaces the existing column
public static ValueExpressionColumn getColumnExpressionForName(QueryInsertStatement insertStmt,
                                                               java.lang.String columnName)
insertStmt - the insert statment to search oncolumnName - the column name to search for
public static QueryValueExpression getInsertValueforColumn(QueryInsertStatement insertStmt,
                                                           ValueExpressionColumn colExpr)
insertStmt - the statement from which the value is to be searched forcolExpr - the column for which the value is to be searched for
public static void addOrReplaceTargetTable(TableInDatabase targetTable,
                                           QueryInsertStatement stmt)
targetTable - the new table to usestmt - the statement to modifypublic static void removeTableFromStatement(QueryInsertStatement statement)
statement - the statement to modify
public static void replaceStatementContents(QueryInsertStatement oldStmt,
                                            QueryInsertStatement newStmt)
oldStmt - statement in which the containments are being replacednewStmt - statement whose contents are used to replace contents in oldStmt
public static void setTargetTable(QueryInsertStatement statement,
                                  TableInDatabase targetTable)
statement - the statement to be modifiedtargetTable - the new TargetTableExpression| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||