com.raritantechnologies.searchApp.database
Class AdhocInfoSearchSource

java.lang.Object
  extended bycom.raritantechnologies.searchApp.SearchSource
      extended bycom.raritantechnologies.searchApp.database.AdhocInfoSearchSource
All Implemented Interfaces:
IQueryProcessor, IXMLSearchSourceFactory

public class AdhocInfoSearchSource
extends SearchSource
implements IQueryProcessor, IXMLSearchSourceFactory

SearchSource that is specialized to retrieve ResultSets from RTI Adhoc_Info tables.

XML Configuration Template:
  <SourceType name="adhocDBSource" type="AdhocInfoSearchSource"
            sourceFactoryClass="com.raritantechnologies.searchApp.database.AdhocInfoSearchSource" 
            queryProcessor="com.raritantechnologies.searchApp.database.AdhocInfoSearchSource" 
            connectionManager="[name of SystemObject ConnectionManager]"
            queryManager="[name of SystemObject SQLQueryManager]"
            itemType="RTI_QUERY|RTI_RESULT" >

    <!-- Valid Search Fields -->
    <SearchFields>
      <Field ID="[a search field]" />
      <Field ID="[another field]" />
    </SearchFields>

    <ResultFields>
      <Field ID="[a result field]" />
      <Field ID="[another field]" />
    </ResultFields>

  </SourceType>
 

Developed by Raritan Technologies .

Author:
Ted Sullivan

Field Summary
static java.lang.String DATE_FIELD
           
static java.lang.String DESC_FIELD
           
static java.lang.String NAME_FIELD
           
static java.lang.String OWNER_FIELD
           
static java.lang.String STATUS_FIELD
           
 
Fields inherited from class com.raritantechnologies.searchApp.SearchSource
ID_FIELD, IS_FEDERATED, NUMBER_OF_FIELDS, SECURE, SOURCE_NAME, SOURCE_TYPE, TITLE_FIELD, URL_FIELD
 
Constructor Summary
AdhocInfoSearchSource()
           
 
Method Summary
 SearchSource[] createSearchSources(org.w3c.dom.Element sourceElem, ISearchFieldMapFactory factory)
           
 IResultSet executeQuery(java.lang.Integer queryID, ISearchFieldMap searchMap, SourceLoginInfo[] sources, OrderedMap inputParameters, java.lang.Integer pageSize, java.lang.Integer startRec)
          Executes a Query.
 java.lang.Object getProperty(java.lang.String property)
          returns a Source Property.
 IQueryProcessor getQueryProcessor()
          returns the type of QueryProcessor that can access this SearchSource.
 IResultSet getResultSet(LoginInfo userInfo, java.lang.Integer queryID, OrderedMap inputParameters, java.lang.Integer pageSize, java.lang.Integer startRec)
           
 java.lang.String[] getSourcePropertyNames()
          Returns a list of Source type specific property names.
 void initializeSource(org.w3c.dom.Element sourceElem, SearchSource source)
           
 
Methods inherited from class com.raritantechnologies.searchApp.SearchSource
addFieldFormatter, addSearchField, addSourceAttributes, addStaticField, addStaticFields, addUserSearchField, canAccess, canConsolidateSources, consolidateSources, delSearchField, formatResult, formatResult, formatResultField, formatResultField, formatResults, formatResults, getAccessableFields, getAttributes, getBasePath, getConfigPath, getDisplayName, getFieldFormatters, getIDField, getName, getSearchField, getSearchFieldID, getSearchFields, getSearchFields, getSecondarySortSpec, getSecurityManager, getSecurityManagerName, getSecurityModel, getSortSpec, getSourceCredentials, getTitleField, getType, getURLField, getUserSearchFields, isMultiThreaded, setConfigPath, setDisplayName, setIDField, setMultiThreaded, setName, setSecurityManagerName, setSecurityModel, setSortMap, setSourcePropertyInfoSource, setTitleField, setType, setURLField, shouldFormatResults, supportsBackgroundSort
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME_FIELD

public static final java.lang.String NAME_FIELD
See Also:
Constant Field Values

DESC_FIELD

public static final java.lang.String DESC_FIELD
See Also:
Constant Field Values

OWNER_FIELD

public static final java.lang.String OWNER_FIELD
See Also:
Constant Field Values

STATUS_FIELD

public static final java.lang.String STATUS_FIELD
See Also:
Constant Field Values

DATE_FIELD

public static final java.lang.String DATE_FIELD
See Also:
Constant Field Values
Constructor Detail

AdhocInfoSearchSource

public AdhocInfoSearchSource()
Method Detail

getQueryProcessor

public IQueryProcessor getQueryProcessor()
Description copied from class: SearchSource
returns the type of QueryProcessor that can access this SearchSource.

Specified by:
getQueryProcessor in class SearchSource

getResultSet

public IResultSet getResultSet(LoginInfo userInfo,
                               java.lang.Integer queryID,
                               OrderedMap inputParameters,
                               java.lang.Integer pageSize,
                               java.lang.Integer startRec)

executeQuery

public IResultSet executeQuery(java.lang.Integer queryID,
                               ISearchFieldMap searchMap,
                               SourceLoginInfo[] sources,
                               OrderedMap inputParameters,
                               java.lang.Integer pageSize,
                               java.lang.Integer startRec)
                        throws QueryProcessorException
Description copied from interface: IQueryProcessor
Executes a Query. Returns results in the form of an IResultSet object.

Specified by:
executeQuery in interface IQueryProcessor
Parameters:
queryID - Unique ID for this query. Used by front end to manage queries and query pages. QueryProcessor may use this parameter to organize its search results, and to organize any state information it needs to process future page requests (future executeQuery( ) calls with the same queryID.
searchMap - Provides mapping information needed to translate the inputParameters into a search string appropriate for this type of QueryProcessor. Mapping information is obtained by the application framework from local configuration data.
sources - The LoginInfo and SearchSource(s) to be used for this query. The SearchSource(s) must be of the appropriate type for the QueryProcessor.
inputParameters - Form inputs. Use ISearchFieldMap to translate these into implementation and source-specific fields.
pageSize - Integer specifying the number of results to include in the returned Document. if null - use the default page size.
startRec - Integer specifying the starting record in the result set to be returned. if null - start with the first record.
Returns:
IResultSet containing result set.
Throws:
QueryProcessorException

createSearchSources

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

initializeSource

public void initializeSource(org.w3c.dom.Element sourceElem,
                             SearchSource source)
Specified by:
initializeSource in interface IXMLSearchSourceFactory

getSourcePropertyNames

public java.lang.String[] getSourcePropertyNames()
Description copied from class: SearchSource
Returns a list of Source type specific property names.

Overrides:
getSourcePropertyNames in class SearchSource

getProperty

public java.lang.Object getProperty(java.lang.String property)
Description copied from class: SearchSource
returns a Source Property. The standard pattern is to return a String or Object if a property has a single value and a String or Object Array if the property has multiple values.

Overrides:
getProperty in class SearchSource