org.apache.torque.task
Class TorqueDataDumpTask.TableTool

java.lang.Object
  extended byorg.apache.torque.task.TorqueDataDumpTask.TableTool
All Implemented Interfaces:
java.util.Iterator
Enclosing class:
TorqueDataDumpTask

public class TorqueDataDumpTask.TableTool
extends java.lang.Object
implements java.util.Iterator

A nasty do-it-all tool class. It serves as:


Constructor Summary
  TorqueDataDumpTask.TableTool()
          Constructor for the TableTool object
protected TorqueDataDumpTask.TableTool(java.sql.ResultSet rs)
          Constructor for the TableTool object
 
Method Summary
 TorqueDataDumpTask.TableTool fetch(java.lang.String tableName)
          Fetches an Iterator for the data in the named table.
 java.lang.String get(java.lang.String columnName)
          Returns the value for the column
 boolean hasNext()
          check if there are more records in the QueryDataSet
 java.lang.Object next()
          load the next record from the QueryDataSet
 void remove()
          unsupported! always throws Exception
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TorqueDataDumpTask.TableTool

public TorqueDataDumpTask.TableTool()
Constructor for the TableTool object


TorqueDataDumpTask.TableTool

protected TorqueDataDumpTask.TableTool(java.sql.ResultSet rs)
                                throws java.lang.Exception
Constructor for the TableTool object

Throws:
java.lang.Exception - Problem using database record set cursor.
Method Detail

fetch

public TorqueDataDumpTask.TableTool fetch(java.lang.String tableName)
                                   throws java.lang.Exception
Fetches an Iterator for the data in the named table.

Parameters:
tableName - Description of Parameter
Returns:
Iterator for the fetched data.
Throws:
java.lang.Exception - Problem creating connection or executing query.

hasNext

public boolean hasNext()
check if there are more records in the QueryDataSet

Specified by:
hasNext in interface java.util.Iterator
Returns:
true if there are more records

next

public java.lang.Object next()
                      throws java.util.NoSuchElementException
load the next record from the QueryDataSet

Specified by:
next in interface java.util.Iterator
Returns:
Description of the Returned Value
Throws:
java.util.NoSuchElementException - Description of Exception

get

public java.lang.String get(java.lang.String columnName)
Returns the value for the column

Parameters:
columnName - name of the column
Returns:
value of the column or null if it doesn't exist

remove

public void remove()
            throws java.lang.UnsupportedOperationException
unsupported! always throws Exception

Specified by:
remove in interface java.util.Iterator
Throws:
java.lang.UnsupportedOperationException - unsupported


Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.