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:

Author:
fedor

Field Summary
private  int curIndex
          current index
private  com.workingdogs.village.Record curRec
          current record
private  boolean isEmpty
          is empty
private  com.workingdogs.village.QueryDataSet qds
          querydataset
 
Constructor Summary
  TorqueDataDumpTask.TableTool()
          Constructor for the TableTool object
protected TorqueDataDumpTask.TableTool(com.workingdogs.village.QueryDataSet qds)
          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
 

Field Detail

qds

private com.workingdogs.village.QueryDataSet qds
querydataset


isEmpty

private boolean isEmpty
is empty


curIndex

private int curIndex
current index


curRec

private com.workingdogs.village.Record curRec
current record

Constructor Detail

TorqueDataDumpTask.TableTool

public TorqueDataDumpTask.TableTool()
Constructor for the TableTool object


TorqueDataDumpTask.TableTool

protected TorqueDataDumpTask.TableTool(com.workingdogs.village.QueryDataSet qds)
                                throws java.lang.Exception
Constructor for the TableTool object

Parameters:
qds - Description of Parameter
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-2003 Apache Software Foundation. All Rights Reserved.