com.penguinwerks.jodene.managers
Class ResultSetManager

java.lang.Object
  extended bycom.penguinwerks.jodene.managers.ResultSetManager

public class ResultSetManager
extends java.lang.Object

Manages result sets, which are the results processed by the network.

Author:
Paul Hoehne

Method Summary
 void addInputData(ResultSet data, DataStorageTag tag, java.lang.String name)
          Adds a result set to the vault with the given storage tag.
 void addInputData(ResultSet data, java.lang.String name)
          Add result sets to the vault.
 void cleanVault()
          Cleans the results sets from the vault.
 ResultSet getInputData(java.lang.String name)
          Returns the named result set.
static ResultSetManager getManager()
          Returns an instance of the result set manager.
 DataStorageTag getStorageTag(java.lang.String name)
          Returns the data storage tag for the result set.
 java.lang.String getVaultDirectory()
          Returns the vault directory for the result sets.
 java.util.List listResultSets()
          Lists the result set in the vaults.
 void setVaultDirectory(java.lang.String directory)
          Sets the vault directory for the result sets.
 void updateDataSet(ResultSet data, DataStorageTag tag, java.lang.String name)
          Update the result set in the vault with the given storage tag.
 void updateDataSet(ResultSet data, java.lang.String name)
          Update the data set in the vault with the data and name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getManager

public static ResultSetManager getManager()
Returns an instance of the result set manager.

Returns:
The result set manager.

addInputData

public void addInputData(ResultSet data,
                         DataStorageTag tag,
                         java.lang.String name)
                  throws java.io.IOException
Adds a result set to the vault with the given storage tag.

Parameters:
data - The result set.
tag - The data storage tag.
name - The name of throws the result set.
Throws:
IOException - thrown if there is a problem.

addInputData

public void addInputData(ResultSet data,
                         java.lang.String name)
                  throws java.io.FileNotFoundException,
                         java.io.IOException,
                         java.lang.ClassNotFoundException
Add result sets to the vault.

Parameters:
data - The result set.
name - The name of the result set.
Throws:
FileNotFoundException - Thrown if there is a problem.
IOException - Thrown if there is a problem.
java.lang.ClassNotFoundException - Thrown if there is a problem.

cleanVault

public void cleanVault()
Cleans the results sets from the vault.


getInputData

public ResultSet getInputData(java.lang.String name)
                       throws java.io.IOException,
                              java.lang.ClassNotFoundException
Returns the named result set.

Parameters:
name - The name of the result set.
Returns:
The result set.
Throws:
IOException - Thrown if there is a problem.
java.lang.ClassNotFoundException - Thrown if there is a problem.

getStorageTag

public DataStorageTag getStorageTag(java.lang.String name)
                             throws java.io.FileNotFoundException,
                                    java.io.IOException,
                                    java.lang.ClassNotFoundException
Returns the data storage tag for the result set.

Parameters:
name - The name of the result set.
Returns:
the Data storage tag.
Throws:
FileNotFoundException - Thrown if there is a problem.
IOException - Thrown if there is a problem.
java.lang.ClassNotFoundException - Thrown if there is a problem.

getVaultDirectory

public java.lang.String getVaultDirectory()
Returns the vault directory for the result sets.

Returns:
The vault directory.

setVaultDirectory

public void setVaultDirectory(java.lang.String directory)
Sets the vault directory for the result sets.

Parameters:
directory - The vault directory.

listResultSets

public java.util.List listResultSets()
Lists the result set in the vaults.

Returns:
The list of data sets in the vault.

updateDataSet

public void updateDataSet(ResultSet data,
                          DataStorageTag tag,
                          java.lang.String name)
                   throws java.io.IOException
Update the result set in the vault with the given storage tag.

Parameters:
data - The result set.
tag - The data storage tag.
name - The name of the storage tag.
Throws:
IOException - Thrown if there is a porblem saving the result set.

updateDataSet

public void updateDataSet(ResultSet data,
                          java.lang.String name)
                   throws java.io.FileNotFoundException,
                          java.io.IOException,
                          java.lang.ClassNotFoundException
Update the data set in the vault with the data and name.

Parameters:
data - The result set.
name - The name of the result set.
Throws:
FileNotFoundException - Thrown if result set not saved.
IOException - Thrown if result set not saved.
java.lang.ClassNotFoundException - Thrown if result set not saved.