|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.database.DatabaseOutputProcessor
Stores RTI ResultSets in a RDBMS using the RTI adhoc table schema developed for the RTI eCommerce framework.
XML Configuration Template:
<GatewayOutputProcessor
class="com.raritantechnologies.searchApp.database.DatabaseOutputProcessor"
connectionManager="[Database connection manager SystemObject name]"
queryManager="[query manager SystemObject name]"
itemIDField="[ name of IResult field with item ID (key) ]"
userNameField="[IResult field to get userName]"
defaultUserName"[userName if result userName field is empty]"
resultNameField="[IResult field to get result name]"
defaultResultName="[name if result name field is empty]"
descriptionField="[IResult field to get description]"
defaultDescription="[description to use if result desc field is empty]"
sourceNameField="[field name to store source name]" >
<!-- Use Columns for RTI Adhoc table structure: -->
<Columns sub_type="[subtype value or $parameter ]">
<Column ID="[field to save]" />
<Column ID="[another field]" />
</Columns>
<!-- Alternatively: use SQLTemplates to store result data in a set of DB tables -->
<!-- Set of SQL Templates that are used to store data in tables. Placeholders are -->
<!-- Used to map result fields to table columns (e.g. {FIELDNAME} maps the 'FIELDNAME' field -->
<!-- in the result to the first column in the INSERT statement -->
<SQLTemplates>
<CheckTable>
<DescribeTable>
</DescribeTable>
<CreateTable>
</CreateTable>
</CheckTable>
<SQLTemplate>INSERT INTO TABLE_NAME VALUES ( {FiELDNAME}, {FIELDNAME2}, {FIELDNAME3} )
<ChoiceTemplate>
<Test>select * from TABLE_NAME where FIELDNAME = {FIELDNAME}</Test>
<NullTemplates>
<SQLTemplate>[ SQL Statement to run if test is NULL ]
</NullTemplates>
<UpdateTemplates>
<SQLTemplate>[ SQL Statement to run it test is NOT NULL ]</SQLTemplate>
</UpdateTemplates>
</ChoiceTemplate>
<SQLTemplates>
</GatewayOutputProcessor>
| Field Summary | |
static java.lang.String |
ITEM_TABLE
|
static java.lang.String |
PROP_TABLE
|
static java.lang.String |
RESULT_TYPE
|
| Constructor Summary | |
DatabaseOutputProcessor()
|
|
| Method Summary | |
void |
dataComplete()
Data feed is complete. |
java.lang.String |
getConfigurationXML()
|
void |
initialize(org.w3c.dom.Element elem)
Initialize the from XML Element. |
void |
initialize(org.w3c.dom.Element outputProcElem,
ISearchFieldMap sfMap)
Initialize the GatewayOutputProcessor from XML Configuration Element. |
void |
initialize(java.util.Map initParams)
Used for dynamic initialization (connection, collection name, file name, etc.) |
java.lang.String |
processData(IResultSet data)
returns name of XML File created/appended. |
void |
processResultSet(java.lang.String sessionID,
IResultSet data)
processes the IResultSet (somehow) |
void |
setConnectionManagerName(java.lang.String connectionManagerName)
|
void |
setItemIDField(java.lang.String itemIDField)
|
void |
setQueryManagerName(java.lang.String queryManagerName)
|
void |
setSQLTemplates(java.util.List SQLTemplates)
|
void |
storeResult(IResult res)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String RESULT_TYPE
public static java.lang.String ITEM_TABLE
public static java.lang.String PROP_TABLE
| Constructor Detail |
public DatabaseOutputProcessor()
| Method Detail |
public void processResultSet(java.lang.String sessionID,
IResultSet data)
IResultSetProcessor
processResultSet in interface IResultSetProcessorpublic java.lang.String processData(IResultSet data)
IGatewayOutputProcessor
processData in interface IGatewayOutputProcessorpublic void storeResult(IResult res)
public void dataComplete()
dataComplete in interface IGatewayOutputProcessorpublic void initialize(org.w3c.dom.Element elem)
IResultSetProcessor
initialize in interface IResultSetProcessor
public void initialize(org.w3c.dom.Element outputProcElem,
ISearchFieldMap sfMap)
IGatewayOutputProcessor
initialize in interface IGatewayOutputProcessorpublic void initialize(java.util.Map initParams)
IGatewayOutputProcessor
initialize in interface IGatewayOutputProcessorpublic java.lang.String getConfigurationXML()
getConfigurationXML in interface IGatewayOutputProcessorpublic void setConnectionManagerName(java.lang.String connectionManagerName)
public void setQueryManagerName(java.lang.String queryManagerName)
public void setItemIDField(java.lang.String itemIDField)
public void setSQLTemplates(java.util.List SQLTemplates)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||