com.raritantechnologies.federated.SQL
Class SQLSearchSourceFactory

java.lang.Object
  extended bycom.raritantechnologies.searchApp.XMLSearchSourceFactory
      extended bycom.raritantechnologies.federated.SQL.SQLSearchSourceFactory
All Implemented Interfaces:
IXMLSearchSourceFactory

public class SQLSearchSourceFactory
extends XMLSearchSourceFactory

Responsible for constructing SQLSearchSource objects from <SourceType> XML tags.

XML Configuration Template:
  <SourceType name="OracleLookup"
            type="SQLSearchSource"
            displayName="Oracle9i (rartech2)" 
            sourceFactoryClass="com.raritantechnologies.federated.SQL.SQLSearchSourceFactory" 
            queryProcessor="com.raritantechnologies.federated.SQL.SQLQueryProcessor"
            constructWhereClause="true(default)|false"
            blankQueryReturnsAll="false"
            IDField="[ field with document ID ]"
            URLField="[ field with document URL ]"
            titleField="[ field with document title ]" >
  	
    <LoginProcess 
              databaseConnectionManagerName="JNDI-name" 
		jdbcDriverClass="oracle.jdbc.driver.OracleDriver" 
              jdbcURL="[JDBC URL]" 
              UserName="[DB user name]" 
              Password="[DB password]" 
              PasswordEnc="[DES encrypted DB password]" />    

    <SearchProcess>
      <SQLTemplate>
          select * from tableName
      </SQLTemplate> 

      <QueryColumn ID="[ name of RTI query field ]" colName="[ database column name ]" 
                      ignoreCase="[true(default)|false]" 
                      op="[ SQL operator e.g. 'like' ]" 
                      isKeyword="[true|false(default)]"/>
    </SearchProcess>
	
    <ResultMap>
      <ResultField fieldID="[ result field ID ]" colName="[ database column name ]"/>
      <ResultField fieldID="[ result field ID ]" colName="[ database column name ]"/>
    </ResultMap>

 </SourceType> 
 
NOTE: the LoginProcess section should contain EITHER if both are specified, the databaseConnectionManagerName is used.
Developed by Raritan Technologies Inc..

Author:
Bill Ellis

Constructor Summary
SQLSearchSourceFactory()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
 
Methods inherited from class com.raritantechnologies.searchApp.XMLSearchSourceFactory
changeBasePath, initializeFieldFormatters, initializeSource, initializeStaticFields
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLSearchSourceFactory

public SQLSearchSourceFactory()
Method Detail

createSearchSources

public SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem,
                                          ISearchFieldMapFactory factory)
Specified by:
createSearchSources in interface IXMLSearchSourceFactory
Specified by:
createSearchSources in class XMLSearchSourceFactory