com.raritantechnologies.searchApp.database
Class SQLQueryManager

java.lang.Object
  extended bycom.raritantechnologies.searchApp.database.SQLQueryManager
All Implemented Interfaces:
IConfigurable

public class SQLQueryManager
extends java.lang.Object
implements IConfigurable

Manages a set of SQL queries. Input is either from a properties file or from an XML Configuration file.

XML Configuration Template:
   <SystemObject type="SQLQueryManager" name="[my name]"
                    configurableClass="com.raritantechnologies.searchApp.database.SQLQueryManager"
                    dbProperties="[file name of properties file]" >

     <!-- Add additional queries -->
     <Query name="[query name]" >select * from foo where id='bar'</Query>
   </SystemObject>
 

Developed by Raritan Technologies .

Author:
Alan Connell

Constructor Summary
SQLQueryManager()
           
 
Method Summary
 java.lang.String buildQuery(java.lang.String queryName, java.lang.String params)
           
 java.lang.String buildQuery(java.lang.String queryName, java.lang.String params, boolean allowBlankParams)
           
 java.lang.String getParseToken()
           
 java.lang.String getQuery(java.lang.String queryName)
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLQueryManager

public SQLQueryManager()
Method Detail

getQuery

public java.lang.String getQuery(java.lang.String queryName)

getParseToken

public java.lang.String getParseToken()

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable

buildQuery

public java.lang.String buildQuery(java.lang.String queryName,
                                   java.lang.String params)

buildQuery

public java.lang.String buildQuery(java.lang.String queryName,
                                   java.lang.String params,
                                   boolean allowBlankParams)