Method to print entire ResultSet in Custom component
intradoc.data.ResultSet
private void traceResultSet (final intradoc.data.ResultSet rs)
{
int rowCount = 0;
int columsize = rs.getNumFields();
for(rs.first(); rs.isRowPresent(); rs.next())
{
for (int j=0;j< columsize ; j++)
{
String key = rs.getFieldName(j);
String value = rs.getStringValueByName(key);
traceVerbose (key + " " + value);
}
rowCount++;
traceVerbose ("Going to Next Row ---");
}
} // end of traceResultSet
private static void trace(final String message)
{
Report.trace("MyCustomComponent", message, null);
}
private static void traceVerbose(final String message)
{
if (Report.m_verbose)
{
trace(message);
}
} // end of TraceVerbose
intradoc.data.ResultSet
private void traceResultSet (final intradoc.data.ResultSet rs)
{
int rowCount = 0;
int columsize = rs.getNumFields();
for(rs.first(); rs.isRowPresent(); rs.next())
{
for (int j=0;j< columsize ; j++)
{
String key = rs.getFieldName(j);
String value = rs.getStringValueByName(key);
traceVerbose (key + " " + value);
}
rowCount++;
traceVerbose ("Going to Next Row ---");
}
} // end of traceResultSet
private static void trace(final String message)
{
Report.trace("MyCustomComponent", message, null);
}
private static void traceVerbose(final String message)
{
if (Report.m_verbose)
{
trace(message);
}
} // end of TraceVerbose
No comments:
Post a Comment