wt.enterprise.tabularresults
Class QueryServiceProvider

java.lang.Object
  extended bywt.enterprise.tabularresults.QueryServiceProvider

public class QueryServiceProvider
extends Object

This class provides a subclass of wt.enterprise.tabularresults.BaseQueryService Currently a subclass of wt.enterprise.tabularresults.BaseQueryService is found by testing if the file name passed in is the fully qualified path the subclass. If this test fails, then all of the subclasses of BaseQueryService are enumerated over and the name of the subclass is tested against the name of the file name that was passed in. If a match is found, a concreate instance is returned. Otherwise, a WTException is thrown.

Supported API: false

Extendable: false

See Also:
BaseQueryService

Constructor Summary
QueryServiceProvider()
           
 
Method Summary
 BaseQueryService getChildOfBaseQuery(String child_name)
          This class uses the fact that BaseQueryService implements NetFactor to able to find all of BaseQueryService's children.
 BaseQueryService getqueryService(String query_service_name)
          This method will generate an instance of a subclass of BaseQueryService using the string that is in query_service_name.
 Object loadClass(String class_name)
          This method takes in a full class path and tries to instantiate an instance of that class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryServiceProvider

public QueryServiceProvider()
Method Detail

getqueryService

public BaseQueryService getqueryService(String query_service_name)
                                 throws WTException
This method will generate an instance of a subclass of BaseQueryService using the string that is in query_service_name. If the string in query_service_name is a full path name of the subclass of BaseQueryService, then an instance of that class will be instantiated. Otherwise, getqueryService makes a call to getChildOfBaseQuery and enumerates over the subclasses of BaseQueryService to find one that has a name that matches the name of the file in the string query_service_name. If both of these attempts to instantiate a subclass of BaseQueryService fail, a WTException is thrown.

Supported API: false

Parameters:
query_service_name - This can be a full path to the subclass of BasicQueryService or simply the name of the sublass
Returns:
BaseQueryService An instance of a sublass of BaseQueryService that is generated by query_service_name
Throws:
WTException

loadClass

public Object loadClass(String class_name)
                 throws WTException
This method takes in a full class path and tries to instantiate an instance of that class. The constructor called the constructor withOUT any arguments.

Supported API: false

Parameters:
class_name - the full class path of the class to instantiate
Returns:
Object An instance of the class named in class_name
Throws:
WTException

getChildOfBaseQuery

public BaseQueryService getChildOfBaseQuery(String child_name)
                                     throws WTException
This class uses the fact that BaseQueryService implements NetFactor to able to find all of BaseQueryService's children. Then this method loops over these children and compares the name of the children to the string in child_name. The string child_name should not contain any path information about the package that the subclass of BaseQueryService should be in.

Supported API: false

Parameters:
child_name - This string is assumed to be the name of the subclass of BaseQueryService to instantiate
Returns:
BaseQueryService An instance of the subclass of BaseQueryService named in child_name
Throws:
WTException