org.apache.torque.task
Class TorqueDataDumpTask.TableTool

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

public class TorqueDataDumpTask.TableTool
extends Object
implements Iterator

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


Constructor Summary
  TorqueDataDumpTask.TableTool()
          Constructor for the TableTool object.
protected TorqueDataDumpTask.TableTool(ResultSet rs)
          Constructor for the TableTool object.
 
Method Summary
 TorqueDataDumpTask.TableTool fetch(String tableName)
          Fetches an Iterator for the data in the named table.
 String get(String columnName)
          Returns the value for the column.
 boolean hasNext()
          check if there are more records in the QueryDataSet.
 Object next()
          load the next record from the QueryDataSet.
 void remove()
          Dummy implementation of the remove() method of the iterator interface.
 
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(ResultSet rs)
                                throws Exception
Constructor for the TableTool object.

Parameters:
rs - a query result set
Throws:
Exception - Problem using database record set cursor.
Method Detail

fetch

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

Parameters:
tableName - Description of Parameter
Returns:
Iterator for the fetched data.
Throws:
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 Iterator
Returns:
true if there are more records

next

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

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

get

public String get(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 UnsupportedOperationException
Dummy implementation of the remove() method of the iterator interface. This implementation always throws a UnsupportedOperationException

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException - always.


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