Package net.sourceforge.squirrel_sql.fw.datasetviewer

Examples of net.sourceforge.squirrel_sql.fw.datasetviewer.IDataSet


  @Test
  public void testCreateDataSet() throws Exception
  {
   
    IDataSet mockImportedKeysDataSet = mockHelper.createMock("mockImportedKeysDataSet", IDataSet.class);
    IDataSet mockExportedKeysDataSet = mockHelper.createMock("mockExportedKeysDataSet", IDataSet.class);
   
    expect(mockSQLDatabaseMetaData.getImportedKeysDataSet(mockTableInfo)).andStubReturn(mockImportedKeysDataSet);
    expect(mockSQLDatabaseMetaData.getExportedKeysDataSet(mockTableInfo)).andStubReturn(mockExportedKeysDataSet);
   
    mockHelper.replayAll();
    classUnderTest.setTableInfo(mockTableInfo);
    classUnderTest.setSession(mockSession);
    classUnderTest.setDatabaseObjectInfo(mockTableInfo);
    IDataSet result = classUnderTest.createDataSet();
    assertNotNull(result);
    mockHelper.verifyAll();
  }
View Full Code Here


    replacements.put(9, replacementMap);
    replacements.put(10, replacementMap);
   
    final ISQLConnection conn = getSession().getSQLConnection();
   
    IDataSet orig = getUnfilteredDataSet(conn.getSQLMetaData(), getTableInfo());
     return new FilterDataSet(orig, replacements);
  }
View Full Code Here

   * Create the <TT>IDataSet</TT> to be displayed in this tab.
   */
  protected IDataSet createDataSet() throws DataSetException
  {
    final ISQLConnection conn = getSession().getSQLConnection();
        IDataSet result = null;
        SQLDatabaseMetaData md = conn.getSQLMetaData();
        result = md.getPrimaryKey(getTableInfo(),
                                  new int[] { 6, 5, 4 },
                                  true);
        return result;
View Full Code Here

    ResultSet rs = null;
    try
    {
      pstmt = createStatement();
      rs = pstmt.executeQuery();
      final IDataSet ds = createDataSetFromResultSet(rs);
      _comp.load(ds);
    } catch (SQLException ex)
    {
      throw new DataSetException(ex);
    } finally
View Full Code Here

   *      int[], boolean)
   */
  public synchronized IDataSet getColumns(ITableInfo ti, int[] columnIndices, boolean computeWidths)
    throws DataSetException
  {
    IDataSet result = null;
    ResultSet rs = null;
    try
    {
      rs = getColumns(ti);
      ResultSetDataSet rsds = new ResultSetDataSet();
View Full Code Here

TOP

Related Classes of net.sourceforge.squirrel_sql.fw.datasetviewer.IDataSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.