org.eclipse.datatools.sqltools.data.internal.core.editor
Class TableDataImpl
java.lang.Object
   org.eclipse.datatools.sqltools.data.internal.core.editor.TableDataImpl
org.eclipse.datatools.sqltools.data.internal.core.editor.TableDataImpl
- All Implemented Interfaces: 
- ITableData, ITableData2
- public class TableDataImpl 
- extends java.lang.Object- implements ITableData2
Implementation of the ISqlTableData based on JDBC 1.0 API (should work with any driver).
 The table is queried through a 'select * from ...' statement and the data is stored in a bidimensional
 array of objects.
 Reading data is done by directly accessing the im-memory array.
 Modifying the data is done by issuing insert/update/delete statements, using one of the possible unique
 constraints of the table to uniquely identify the row.
 If no unique constraints is available, all the columns will be used, which doesn't garentee that a single
 column will be modified.
- Author:
- groux
 
 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
TableDataImpl
public TableDataImpl(Table sqlTable)
              throws java.sql.SQLException,
                     java.io.IOException,
                     java.lang.Exception
- Throws:
- java.sql.SQLException
- java.io.IOException
- java.lang.Exception
dispose
public void dispose()
- 
- Specified by:
- disposein interface- ITableData
 
- 
 
getColumnCount
public int getColumnCount()
- 
- Specified by:
- getColumnCountin interface- ITableData
 
- 
 
getColumnHeader
public java.lang.String getColumnHeader(int col)
- 
- Specified by:
- getColumnHeaderin interface- ITableData
 
- 
 
getFormattedTypeName
public static java.lang.String getFormattedTypeName(Column sqlCol)
- 
 
- 
 
getColumnName
public java.lang.String getColumnName(int col)
- 
- Specified by:
- getColumnNamein interface- ITableData
 
- 
 
getQuotedColumnName
public java.lang.String getQuotedColumnName(int col)
- 
- Specified by:
- getQuotedColumnNamein interface- ITableData2
 
- 
 
getColumnType
public int getColumnType(int col)
- 
- Specified by:
- getColumnTypein interface- ITableData
 
- 
 
getColumnTypeName
public java.lang.String getColumnTypeName(int col)
- Gets the name of the column data type as returned by the database
 
- 
- Specified by:
- getColumnTypeNamein interface- ITableData2
 
- 
- Returns:
- the name of the column data type
 
getColumnDataAccessor
public IColumnDataAccessor getColumnDataAccessor(int col)
- 
- Specified by:
- getColumnDataAccessorin interface- ITableData
 
- 
 
getRows
public java.util.Vector getRows()
- 
- Specified by:
- getRowsin interface- ITableData
 
- 
 
getKeyColumns
public int[] getKeyColumns()
- 
- Specified by:
- getKeyColumnsin interface- ITableData2
 
- 
 
getConnection
public java.sql.Connection getConnection()
- 
- Specified by:
- getConnectionin interface- ITableData2
 
- 
 
save
public int save(Output output)
         throws java.sql.SQLException
- 
- Specified by:
- savein interface- ITableData
 
- 
- Throws:
- java.sql.SQLException
 
revert
public void revert()
- 
- Specified by:
- revertin interface- ITableData
 
- 
 
deleteRow
public void deleteRow(IRowData row)
- 
- Specified by:
- deleteRowin interface- ITableData
 
- 
 
insertRow
public IRowData insertRow()
- 
- Specified by:
- insertRowin interface- ITableData
 
- 
 
isReadonly
public boolean isReadonly()
- 
- Specified by:
- isReadonlyin interface- ITableData
 
- 
 
getQualifiedTableName
public java.lang.String getQualifiedTableName()
- 
- Specified by:
- getQualifiedTableNamein interface- ITableData2
 
- 
 
getSQLTable
public Table getSQLTable()
- Gets the SQL Model table
 
- 
- Specified by:
- getSQLTablein interface- ITableData2
 
- 
- Returns:
- the SQL Model table
 
getResultColumns
public java.util.List getResultColumns()
- 
- Specified by:
- getResultColumnsin interface- ITableData2
 
-