public final class ReconResultWriter extends AbstractResultWriter
reconInfo
Constructor and Description |
---|
ReconResultWriter() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
buildCacheQuery(java.lang.String resultTypeExt)
Builds a SELECT statement to retrieve existing data from table
reconresult based on values for recontaskid, resulttype, rulename, ancestorassetnum
|
protected SqlFormat |
buildUpdateQuery(java.lang.Object reconResultId)
Constructs the SQL UPDATE statement to update an existing row in table
reconresult for the given unique recon result identifier.
|
protected void |
cacheExistingReconResults(DBShortcut dbShortcut,
java.lang.String resultTypeExt)
Retrieves and caches existing reconciliation results for comparison rules
|
int |
getDataType(java.lang.String tableName,
java.lang.String columnName)
Returns the datatype of the column name present in table.
|
protected java.lang.Number |
getReconResultId(DBShortcut dbShortcut)
Retrieves the reconresultid column value from the database based on the
values from the execution of the recontask
|
protected java.util.Map |
getReconResultsFromCache()
Retrieves existing reconciliation results from cache based on the values
generated from this cron task execution
|
java.lang.String |
getTableName()
Returns the name of the recon result table.
|
java.lang.String |
getUIDColumnname()
Returns the unique identifier of the unique id column.
|
protected boolean |
isTypeComparison(java.lang.String resultType)
Tests if the given reconciliation type is comparison.
|
protected java.lang.String |
prepareWhereClause(java.lang.String attribute,
java.lang.String value,
int index)
Builds a WHERE clause based on whether or not the attribute contains
a nullable value
|
void |
setValue(java.lang.String attributeName,
java.lang.Object attributeValue)
Sets the value for an attribute to be written out to the table.
|
void |
write(DBShortcut dbShortcut)
Writes out the values to the reconresult table.
|
buildSQLF, getValue, init, setReconInfo
public java.lang.String getTableName()
getTableName
in class AbstractResultWriter
public java.lang.String getUIDColumnname()
getUIDColumnname
in class AbstractResultWriter
protected java.lang.Number getReconResultId(DBShortcut dbShortcut) throws MXException, java.rmi.RemoteException
dbShortcut
- MXException
java.rmi.RemoteException
protected boolean isTypeComparison(java.lang.String resultType)
resultType
- The type of reconciliation resultprotected java.util.Map getReconResultsFromCache()
protected void cacheExistingReconResults(DBShortcut dbShortcut, java.lang.String resultTypeExt) throws MXException, java.rmi.RemoteException
dbShortcut
- MXException
java.rmi.RemoteException
protected java.lang.String buildCacheQuery(java.lang.String resultTypeExt) throws MXException, java.rmi.RemoteException
resultTypeExt
- The translated resulttypeMXException
java.rmi.RemoteException
protected java.lang.String prepareWhereClause(java.lang.String attribute, java.lang.String value, int index) throws MXException, java.rmi.RemoteException
attribute
- Name of the reconciliation result attributevalue
- The value associated with the attributeindex
- The index of the attribute name within the map of
all reconciliation result attributesMXException
java.rmi.RemoteException
public int getDataType(java.lang.String tableName, java.lang.String columnName) throws java.rmi.RemoteException
java.rmi.RemoteException
SqlFormat.getDataType(String tableName, String columnName)
public void setValue(java.lang.String attributeName, java.lang.Object attributeValue) throws MXException, java.rmi.RemoteException
setValue
in interface ResultWriter
setValue
in class AbstractResultWriter
attributeName
- -
the name of the attribute.attributeValue
- -
the value that goes with the attribute name.MXException
- -
throws by the method.java.rmi.RemoteException
- -
thrown by the method.public void write(DBShortcut dbShortcut) throws java.rmi.RemoteException, MXException
write
in interface ResultWriter
write
in class AbstractResultWriter
dbShortcut
- -
the db connection provider.java.rmi.RemoteException
- -
thrown by the method.MXException
- -
thrown by the method.protected SqlFormat buildUpdateQuery(java.lang.Object reconResultId) throws MXException, java.rmi.RemoteException
reconResultId
- Unique identifier for table reconresultMXException
java.rmi.RemoteException