com.fdsapi
Class TabularDataFactory

java.lang.Object
  |
  +--com.fdsapi.TabularDataFactory

public class TabularDataFactory
extends java.lang.Object

Class used to create all forms of Tabular Data such as 2 dimensional arrays and ResultSets have the same interface. This is an example of the Gang of 4 Facade and Factory design patterns. Developers may also check there own types of TabularData into the factory.

View Code


Constructor Summary
protected TabularDataFactory()
           
 
Method Summary
 void addTabularDataFactory(java.lang.Class factoryKey, TabularData factory)
           
static TabularDataFactory createInstance()
          Create a TabularDataFactory
 TabularData getTabularData(java.lang.Object data)
          Return a TabularData object for the passed in Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TabularDataFactory

protected TabularDataFactory()
Method Detail

createInstance

public static TabularDataFactory createInstance()
Create a TabularDataFactory


addTabularDataFactory

public void addTabularDataFactory(java.lang.Class factoryKey,
                                  TabularData factory)

getTabularData

public TabularData getTabularData(java.lang.Object data)

Return a TabularData object for the passed in Object. If the passed in object type (or one of its ancestors) is not in the factory then a RuntimeException will be returned.

Sample Call:
 TabularData tabData=TabularDataFactory.createInstance().getTabularData(resultSet);