Package org.jfree.report

Examples of org.jfree.report.DataSourceException


        {
            return dataSource.getColumnCount();
        }
        catch (com.sun.star.report.DataSourceException e)
        {
            throw new DataSourceException("Failed to query column count.", e);
        }
    }
View Full Code Here


        {
            return dataSource.getColumnName(column + 1);
        }
        catch (com.sun.star.report.DataSourceException e)
        {
            throw new DataSourceException("Failed to query column name.", e);
        }
    }
View Full Code Here

    {
      return (Function) clone();
    }
    catch (CloneNotSupportedException e)
    {
      throw new DataSourceException("Unable to derive a new instance");
    }
  }
View Full Code Here

    {
      throw dse;
    }
    catch (Exception e)
    {
      throw new DataSourceException("Failed to evaluate expression", e);
    }
    finally
    {
      expression.setRuntime(null);
    }
View Full Code Here

      }
    }

    if (resultSet.first() == false)
    {
      throw new DataSourceException("Unable to reset the dataset.");
    }
    cursor = 0;
  }
View Full Code Here

  public boolean setCursorPosition(final int row) throws DataSourceException
  {
    if (row < 0)
    {
      throw new DataSourceException("Negative row number is not valid");
    }
    if (row > rowCount)
    {
      return false;
      // throw new DataSourceException("OutOfBounds:");
    }

    try
    {
      if (cursor == 0)
      {
        resultSet.beforeFirst();
        return true;
      }

      if (resultSet.absolute(row))
      {
        cursor = row;
        return true;
      }
      return false;
      //throw new DataSourceException("Unable to scroll the resultset.");
    }
    catch (SQLException e)
    {
      throw new DataSourceException("Failed to move the cursor: ", e);
    }
  }
View Full Code Here

        return false;
      }
    }
    catch (SQLException e)
    {
      throw new DataSourceException("Failed to move the cursor: ", e);
    }
  }
View Full Code Here

    {
      resultSet.close();
    }
    catch (SQLException e)
    {
      throw new DataSourceException("Failed to close the resultset: ", e);
    }
  }
View Full Code Here

  public Object get(final int column) throws DataSourceException
  {
    if (isReadable() == false)
    {
      throw new DataSourceException("Cannot read from this datasource");
    }

    try
    {
      final Object retval = resultSet.getObject(column + 1);
      if (resultSet.wasNull())
      {
        return null;
      }
      return retval;
    }
    catch (SQLException e)
    {
      throw new DataSourceException("Failed to query data", e);
    }
  }
View Full Code Here

  public Object get(final String col) throws DataSourceException
  {
    final Integer colIdx = (Integer) nameCache.get(col);
    if (colIdx == null)
    {
      throw new DataSourceException
          ("Invalid name specified. There is no such column.");
    }

    return data[colIdx.intValue()].getValue();
  }
View Full Code Here

TOP

Related Classes of org.jfree.report.DataSourceException

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.