Class BasicNoPutResultSetImpl
- java.lang.Object
-
- org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl
-
- All Implemented Interfaces:
NoPutResultSet
,ResultSet
,RowLocationRetRowSource
,RowSource
- Direct Known Subclasses:
NoPutResultSetImpl
abstract class BasicNoPutResultSetImpl extends java.lang.Object implements NoPutResultSet
Abstract ResultSet for for operations that return rows but do not allow the caller to put data on output pipes. This basic implementation does not include support for an Activiation. See NoPutResultSetImpl.java for an implementaion with support for an activiation.This abstract class does not define the entire ResultSet interface, but leaves the 'get' half of the interface for subtypes to implement. It is package-visible only, with its methods being public for exposure by its subtypes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BasicNoPutResultSetImpl.FieldComparator
-
Field Summary
Fields Modifier and Type Field Description protected Activation
activation
private int[]
baseColumnMap
long
beginTime
long
closeTime
(package private) ExecRow
compactRow
long
constructorTime
protected ExecRow
currentRow
protected long
endExecutionTime
protected boolean
finished
protected boolean
isOpen
protected boolean
isTopResultSet
long
nextTime
int
numOpens
long
openTime
double
optimizerEstimatedCost
double
optimizerEstimatedRowCount
(package private) ResultDescription
resultDescription
int
rowsFiltered
int
rowsSeen
protected long
startExecutionTime
private StatementContext
statementContext
private boolean
statisticsTimingOn
NoPutResultSet[]
subqueryTrackingArray
private TransactionController
tc
private java.sql.SQLWarning
warnings
-
Fields inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet
ABSOLUTE, FIRST, LAST, NEXT, PREVIOUS, RELATIVE, TEMPORARY_RESULT_SET_NUMBER
-
Fields inherited from interface org.apache.derby.iapi.sql.ResultSet
CURRENT_RESULTSET_ONLY, ENTIRE_RESULTSET_TREE, ISAFTERLAST, ISBEFOREFIRST, ISFIRST, ISLAST
-
-
Constructor Summary
Constructors Constructor Description BasicNoPutResultSetImpl(ResultDescription resultDescription, Activation activation, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addWarning(java.sql.SQLWarning w)
Add a warning to this result set.protected void
attachStatementContext()
Attach this result set to the top statement context on the stack.void
checkCancellationFlag()
Checks whether the currently executing statement has been cancelled.boolean
checkRowPosition(int isType)
Determine if the cursor is before the first row in the result set.static org.w3c.dom.Element
childrenToXML(org.w3c.dom.Element outerNode, ResultSet outerRS)
Pretty-print the inner ResultSet fields inside an outer ResultSet.void
cleanUp()
Clean up on errorprotected java.lang.String
dumpTimeStats(java.lang.String indent, java.lang.String subIndent)
Dump out the time information for run time stats.private static void
findResultSetFields(java.util.ArrayList<java.lang.reflect.Field> fieldList, java.lang.Class<?> klass)
Find all fields of type ResultSet.void
finish()
Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open().protected void
finishAndRTS()
ExecRow
getAbsoluteRow(int row)
Returns the row at the absolute position from the query, and returns NULL when there is no such position.Activation
getActivation()
ResultSet
getAutoGeneratedKeysResultset()
ResultSet for rows inserted into the table (contains auto-generated keys columns only)java.sql.Timestamp
getBeginExecutionTimestamp()
Get the Timestamp for the beginning of execution.protected ExecRow
getCompactRow(ExecRow candidate, FormatableBitSet accessedCols, boolean isKeyed)
Get a compacted version of the candidate row according to the columns specified in the bit map.protected long
getCurrentTimeMillis()
Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0.protected long
getElapsedMillis(long beginTime)
Return the elapsed time in milliseconds, between now and the beginTime, if DEBUG and RunTimeStats is on, else return 0.java.sql.Timestamp
getEndExecutionTimestamp()
Get the Timestamp for the end of execution.double
getEstimatedRowCount()
Get the estimated row count from this result set.long
getExecuteTime()
Get the execution time in milliseconds.(package private) ExecutionFactory
getExecutionFactory()
Get a execution factoryExecRow
getFirstRow()
Returns the first row from the query, and returns NULL when there are no rows.protected LanguageConnectionContext
getLanguageConnectionContext()
Cache the language connection context.ExecRow
getLastRow()
Returns the last row from the query, and returns NULL when there are no rows.ExecRow
getNextRow()
Return the requested values computed from the next row (if any) for which the restriction evaluates to true.abstract ExecRow
getNextRowCore()
Return the requested values computed from the next row (if any) for which the restriction evaluates to true.int
getPointOfAttachment()
Return the point of attachment for this subquery.ExecRow
getPreviousRow()
Returns the previous row from the query, and returns NULL when there are no more previous rows.ExecRow
getRelativeRow(int row)
Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position.ResultDescription
getResultDescription()
Returns the description of the table's rowsint
getRowNumber()
Returns the row number of the current row.int
getScanIsolationLevel()
Return the isolation level of the scan in the result set.NoPutResultSet[]
getSubqueryTrackingArray(int numSubqueries)
Get the subquery ResultSet tracking array from the top ResultSet.(package private) TransactionController
getTransactionController()
Get the current transaction controller.java.sql.SQLWarning
getWarnings()
Return the set of warnings generated during the execution of this result set.boolean
isClosed()
Report if closed.boolean
isForUpdate()
Is this ResultSet or it's source result set for update This method will be overriden in the inherited Classes if it is trueprotected boolean
isXplainOnlyMode()
void
markAsTopResultSet()
Mark the ResultSet as the topmost one in the ResultSet tree.long
modifiedRowCount()
Returns the number of rows affected by the statement.void
open()
open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values...protected void
recordConstructorTime()
Allow sub-classes to record the total time spent in their constructor time.void
reopenCore()
This is the default implementation of reopenCore().boolean
requiresRelocking()
Do we need to relock the row when going to the heap.int
resultSetNumber()
Get the number of this ResultSet, which is guaranteed to be unique within a statement.boolean
returnsRows()
Returns true.ExecRow
setAfterLastRow()
Sets the current position to after the last row and returns NULL because there is no current row.ExecRow
setBeforeFirstRow()
Sets the current position to before the first row and returns NULL because there is no current row.protected ExecRow
setCompactRow(ExecRow candidateRow, ExecRow compactRow)
Copy columns from the candidate row from the store to the given compact row.protected void
setCompatRow(ExecRow compactRow, DataValueDescriptor[] sourceRow)
private static java.lang.String
stripPackage(java.lang.String className)
Strip the package location from a class nameorg.w3c.dom.Element
toXML(org.w3c.dom.Element parentNode, java.lang.String tag)
Produce an xml image of this ResultSet and its descendant ResultSets.static org.w3c.dom.Element
toXML(org.w3c.dom.Element parentNode, java.lang.String childTag, ResultSet rs)
Pretty-print a ResultSet as an xml child of a parent node.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.derby.iapi.sql.execute.NoPutResultSet
markRowAsDeleted, openCore, positionScanAtRowLocation, setCurrentRow, setHasDeferrableChecks, setNeedsRowLocation, setTargetResultSet, updateRow
-
Methods inherited from interface org.apache.derby.iapi.sql.ResultSet
clearCurrentRow, close, getCursorName, getTimeSpent
-
Methods inherited from interface org.apache.derby.iapi.store.access.RowLocationRetRowSource
needsRowLocation, needsRowLocationForDeferredCheckConstraints, offendingRowLocation, rowLocation
-
Methods inherited from interface org.apache.derby.iapi.store.access.RowSource
closeRowSource, getNextRowFromRowSource, getValidColumns, needsToClone
-
-
-
-
Field Detail
-
isOpen
protected boolean isOpen
-
finished
protected boolean finished
-
currentRow
protected ExecRow currentRow
-
isTopResultSet
protected boolean isTopResultSet
-
warnings
private java.sql.SQLWarning warnings
-
numOpens
public int numOpens
-
rowsSeen
public int rowsSeen
-
rowsFiltered
public int rowsFiltered
-
startExecutionTime
protected long startExecutionTime
-
endExecutionTime
protected long endExecutionTime
-
beginTime
public long beginTime
-
constructorTime
public long constructorTime
-
openTime
public long openTime
-
nextTime
public long nextTime
-
closeTime
public long closeTime
-
optimizerEstimatedRowCount
public double optimizerEstimatedRowCount
-
optimizerEstimatedCost
public double optimizerEstimatedCost
-
statementContext
private StatementContext statementContext
-
subqueryTrackingArray
public NoPutResultSet[] subqueryTrackingArray
-
compactRow
ExecRow compactRow
-
activation
protected final Activation activation
-
statisticsTimingOn
private final boolean statisticsTimingOn
-
resultDescription
ResultDescription resultDescription
-
tc
private transient TransactionController tc
-
baseColumnMap
private int[] baseColumnMap
-
-
Constructor Detail
-
BasicNoPutResultSetImpl
BasicNoPutResultSetImpl(ResultDescription resultDescription, Activation activation, double optimizerEstimatedRowCount, double optimizerEstimatedCost)
Constructor.
Sets beginTime for all children to use to measue constructor time.- Parameters:
resultDescription
- the result description. May be null.activation
- The activationoptimizerEstimatedRowCount
- The optimizer's estimate of the total number of rows for this result setoptimizerEstimatedCost
- The optimizer's estimated cost for this result set
-
-
Method Detail
-
recordConstructorTime
protected final void recordConstructorTime()
Allow sub-classes to record the total time spent in their constructor time.
-
getActivation
public final Activation getActivation()
- Specified by:
getActivation
in interfaceResultSet
-
isXplainOnlyMode
protected final boolean isXplainOnlyMode()
-
reopenCore
public void reopenCore() throws StandardException
This is the default implementation of reopenCore(). It simply does a close() followed by an open(). If there are optimizations to be made (caching, etc), this is a good place to do it -- this will be overridden by a number of resultSet imlementations. and SHOULD be overridden by any node that can get between a base table and a join.- Specified by:
reopenCore
in interfaceNoPutResultSet
- Throws:
StandardException
- thrown if cursor finished.- See Also:
NoPutResultSet.openCore()
-
getNextRowCore
public abstract ExecRow getNextRowCore() throws StandardException
Description copied from interface:NoPutResultSet
Return the requested values computed from the next row (if any) for which the restriction evaluates to true.restriction and projection parameters are evaluated for each row.
- Specified by:
getNextRowCore
in interfaceNoPutResultSet
- Returns:
- the next row in the result
- Throws:
StandardException
- thrown if cursor finished.- See Also:
NoPutResultSet.getNextRowCore()
-
getPointOfAttachment
public int getPointOfAttachment()
Description copied from interface:NoPutResultSet
Return the point of attachment for this subquery. (Only meaningful for Any and Once ResultSets, which can and will only be at the top of a ResultSet for a subquery.)- Specified by:
getPointOfAttachment
in interfaceNoPutResultSet
- Returns:
- int Point of attachment (result set number) for this subquery. (-1 if not a subquery - also Sanity violation)
- See Also:
NoPutResultSet.getPointOfAttachment()
-
markAsTopResultSet
public void markAsTopResultSet()
Mark the ResultSet as the topmost one in the ResultSet tree. Useful for closing down the ResultSet on an error.- Specified by:
markAsTopResultSet
in interfaceNoPutResultSet
-
getScanIsolationLevel
public int getScanIsolationLevel()
Description copied from interface:NoPutResultSet
Return the isolation level of the scan in the result set. Only expected to be called for those ResultSets that contain a scan.- Specified by:
getScanIsolationLevel
in interfaceNoPutResultSet
- Returns:
- The isolation level of the scan (in TransactionController constants).
- See Also:
NoPutResultSet.getScanIsolationLevel()
-
getEstimatedRowCount
public double getEstimatedRowCount()
Description copied from interface:NoPutResultSet
Get the estimated row count from this result set.- Specified by:
getEstimatedRowCount
in interfaceNoPutResultSet
- Returns:
- The estimated row count (as a double) from this result set.
- See Also:
NoPutResultSet.getEstimatedRowCount()
-
requiresRelocking
public boolean requiresRelocking()
Description copied from interface:NoPutResultSet
Do we need to relock the row when going to the heap.- Specified by:
requiresRelocking
in interfaceNoPutResultSet
- Returns:
- Whether or not we need to relock the row when going to the heap.
- See Also:
NoPutResultSet.requiresRelocking()
-
open
public final void open() throws StandardException
open a scan on the table. scan parameters are evaluated at each open, so there is probably some way of altering their values... NOTE: This method should only be called on the top ResultSet of a ResultSet tree to ensure that the entire ResultSet tree gets closed down on an error. the openCore() method will be called for all other ResultSets in the tree.- Specified by:
open
in interfaceResultSet
- Throws:
StandardException
- thrown if cursor finished.
-
getAbsoluteRow
public ExecRow getAbsoluteRow(int row) throws StandardException
Returns the row at the absolute position from the query, and returns NULL when there is no such position. (Negative position means from the end of the result set.) Moving the cursor to an invalid position leaves the cursor positioned either before the first row (negative position) or after the last row (positive position). NOTE: An exception will be thrown on 0.- Specified by:
getAbsoluteRow
in interfaceResultSet
- Parameters:
row
- The position.- Returns:
- The row at the absolute position, or NULL if no such position.
- Throws:
StandardException
- Thrown on failure- See Also:
Row
-
getRelativeRow
public ExecRow getRelativeRow(int row) throws StandardException
Returns the row at the relative position from the current cursor position, and returns NULL when there is no such position. (Negative position means toward the beginning of the result set.) Moving the cursor to an invalid position leaves the cursor positioned either before the first row (negative position) or after the last row (positive position). NOTE: 0 is valid. NOTE: An exception is thrown if the cursor is not currently positioned on a row.- Specified by:
getRelativeRow
in interfaceResultSet
- Parameters:
row
- The position.- Returns:
- The row at the relative position, or NULL if no such position.
- Throws:
StandardException
- Thrown on failure- See Also:
Row
-
setBeforeFirstRow
public ExecRow setBeforeFirstRow() throws StandardException
Sets the current position to before the first row and returns NULL because there is no current row.- Specified by:
setBeforeFirstRow
in interfaceResultSet
- Returns:
- NULL.
- Throws:
StandardException
- Thrown on failure- See Also:
Row
-
checkRowPosition
public boolean checkRowPosition(int isType) throws StandardException
Determine if the cursor is before the first row in the result set.- Specified by:
checkRowPosition
in interfaceResultSet
- Returns:
- true if before the first row, false otherwise. Returns false when the result set contains no rows.
- Throws:
StandardException
- Thrown on error.
-
getRowNumber
public int getRowNumber()
Returns the row number of the current row. Row numbers start from 1 and go to 'n'. Corresponds to row numbering used to position current row in the result set (as per JDBC).- Specified by:
getRowNumber
in interfaceResultSet
- Returns:
- the row number, or 0 if not on a row
-
getFirstRow
public ExecRow getFirstRow() throws StandardException
Returns the first row from the query, and returns NULL when there are no rows.- Specified by:
getFirstRow
in interfaceResultSet
- Returns:
- The first row, or NULL if no rows.
- Throws:
StandardException
- Thrown on failure- See Also:
Row
-
getNextRow
public final ExecRow getNextRow() throws StandardException
Return the requested values computed from the next row (if any) for which the restriction evaluates to true.restriction and projection parameters are evaluated for each row. NOTE: This method should only be called on the top ResultSet of a ResultSet tree to ensure that the entire ResultSet tree gets closed down on an error. the getNextRowCore() method will be called for all other ResultSets in the tree.
- Specified by:
getNextRow
in interfaceResultSet
- Returns:
- the next row in the result
- Throws:
StandardException
- thrown on failure.StandardException
- ResultSetNotOpen thrown if not yet open.- See Also:
Row
-
getPreviousRow
public ExecRow getPreviousRow() throws StandardException
Returns the previous row from the query, and returns NULL when there are no more previous rows.- Specified by:
getPreviousRow
in interfaceResultSet
- Returns:
- The previous row, or NULL if no more previous rows.
- Throws:
StandardException
- Thrown on failure- See Also:
Row
-
getLastRow
public ExecRow getLastRow() throws StandardException
Returns the last row from the query, and returns NULL when there are no rows.- Specified by:
getLastRow
in interfaceResultSet
- Returns:
- The last row, or NULL if no rows.
- Throws:
StandardException
- Thrown on failure- See Also:
Row
-
setAfterLastRow
public ExecRow setAfterLastRow() throws StandardException
Sets the current position to after the last row and returns NULL because there is no current row.- Specified by:
setAfterLastRow
in interfaceResultSet
- Returns:
- NULL.
- Throws:
StandardException
- Thrown on failure- See Also:
Row
-
returnsRows
public boolean returnsRows()
Returns true.- Specified by:
returnsRows
in interfaceResultSet
- Returns:
- TRUE if the statement returns rows, FALSE if not.
-
modifiedRowCount
public final long modifiedRowCount()
Description copied from interface:ResultSet
Returns the number of rows affected by the statement. Only valid of returnsRows() returns false. For other DML statements, it returns the number of rows modified by the statement. For statements that do not affect rows (like DDL statements), it returns zero.- Specified by:
modifiedRowCount
in interfaceResultSet
- Returns:
- The number of rows affect by the statement, so far.
-
cleanUp
public void cleanUp() throws StandardException
Clean up on error- Specified by:
cleanUp
in interfaceResultSet
- Throws:
StandardException
- Thrown on failure
-
isClosed
public boolean isClosed()
Report if closed.
-
finish
public void finish() throws StandardException
Description copied from interface:ResultSet
Tells the system that there will be no more access to any database information via this result set; in particular, no more calls to open(). Will close the result set if it is not already closed.- Specified by:
finish
in interfaceResultSet
- Throws:
StandardException
- on error
-
finishAndRTS
protected final void finishAndRTS() throws StandardException
- Throws:
StandardException
- on error
-
getResultDescription
public ResultDescription getResultDescription()
Returns the description of the table's rows- Specified by:
getResultDescription
in interfaceResultSet
- Returns:
- A ResultDescription describing the results of the statement.
-
getExecuteTime
public long getExecuteTime()
Get the execution time in milliseconds.- Specified by:
getExecuteTime
in interfaceResultSet
- Returns:
- long The execution time in milliseconds.
-
getBeginExecutionTimestamp
public java.sql.Timestamp getBeginExecutionTimestamp()
Get the Timestamp for the beginning of execution.- Specified by:
getBeginExecutionTimestamp
in interfaceResultSet
- Returns:
- Timestamp The Timestamp for the beginning of execution.
-
getEndExecutionTimestamp
public java.sql.Timestamp getEndExecutionTimestamp()
Get the Timestamp for the end of execution.- Specified by:
getEndExecutionTimestamp
in interfaceResultSet
- Returns:
- Timestamp The Timestamp for the end of execution.
-
getSubqueryTrackingArray
public final NoPutResultSet[] getSubqueryTrackingArray(int numSubqueries)
Description copied from interface:ResultSet
Get the subquery ResultSet tracking array from the top ResultSet. (Used for tracking open subqueries when closing down on an error.)- Specified by:
getSubqueryTrackingArray
in interfaceResultSet
- Parameters:
numSubqueries
- The size of the array (For allocation on demand.)- Returns:
- NoPutResultSet[] Array of NoPutResultSets for subqueries.
- See Also:
ResultSet.getSubqueryTrackingArray(int)
-
getCurrentTimeMillis
protected final long getCurrentTimeMillis()
Return the current time in milliseconds, if DEBUG and RunTimeStats is on, else return 0. (Only pay price of system call if need to.)- Returns:
- long Current time in milliseconds.
-
getAutoGeneratedKeysResultset
public ResultSet getAutoGeneratedKeysResultset()
Description copied from interface:ResultSet
ResultSet for rows inserted into the table (contains auto-generated keys columns only)- Specified by:
getAutoGeneratedKeysResultset
in interfaceResultSet
- Returns:
- NoPutResultSet NoPutResultSets for rows inserted into the table.
- See Also:
ResultSet.getAutoGeneratedKeysResultset()
-
getElapsedMillis
protected final long getElapsedMillis(long beginTime)
Return the elapsed time in milliseconds, between now and the beginTime, if DEBUG and RunTimeStats is on, else return 0. (Only pay price of system call if need to.)- Returns:
- long Elapsed time in milliseconds.
-
dumpTimeStats
protected final java.lang.String dumpTimeStats(java.lang.String indent, java.lang.String subIndent)
Dump out the time information for run time stats.- Returns:
- Nothing.
-
attachStatementContext
protected void attachStatementContext() throws StandardException
Attach this result set to the top statement context on the stack. Result sets can be directly read from the JDBC layer. The JDBC layer will push and pop a statement context around each ResultSet.getNext(). There's no guarantee that the statement context used for the last getNext() will be the context used for the current getNext(). The last statement context may have been popped off the stack and so will not be available for cleanup if an error occurs. To make sure that we will be cleaned up, we always attach ourselves to the top context. The fun and games occur in nested contexts: using JDBC result sets inside user code that is itself invoked from queries or CALL statements.- Throws:
StandardException
- thrown if cursor finished.
-
getLanguageConnectionContext
protected final LanguageConnectionContext getLanguageConnectionContext()
Cache the language connection context. Return it.- Returns:
- the language connection context
-
resultSetNumber
public int resultSetNumber()
Description copied from interface:NoPutResultSet
Get the number of this ResultSet, which is guaranteed to be unique within a statement.- Specified by:
resultSetNumber
in interfaceNoPutResultSet
- See Also:
NoPutResultSet.resultSetNumber()
-
getExecutionFactory
final ExecutionFactory getExecutionFactory()
Get a execution factory- Returns:
- the execution factory
-
getTransactionController
final TransactionController getTransactionController()
Get the current transaction controller.
-
getCompactRow
protected ExecRow getCompactRow(ExecRow candidate, FormatableBitSet accessedCols, boolean isKeyed) throws StandardException
Get a compacted version of the candidate row according to the columns specified in the bit map. Share the holders between rows. If there is no bit map, use the candidate row as the compact row. Also, create an array of ints mapping base column positions to compact column positions, to make it cheaper to copy columns to the compact row, if we ever have to do it again.- Parameters:
candidate
- The row to get the columns fromaccessedCols
- A bit map of the columns that are accessed in the candidate rowisKeyed
- Tells whether to return a ValueRow or an IndexRow- Returns:
- A compact row.
- Throws:
StandardException
-
setCompactRow
protected ExecRow setCompactRow(ExecRow candidateRow, ExecRow compactRow)
Copy columns from the candidate row from the store to the given compact row. If there is no column map, just use the candidate row. This method assumes the above method (getCompactRow()) was called first. getCompactRow() sets up the baseColumnMap.- Parameters:
candidateRow
- The candidate row from the storecompactRow
- The compact row to fill in- Returns:
- The compact row to use
-
setCompatRow
protected final void setCompatRow(ExecRow compactRow, DataValueDescriptor[] sourceRow)
-
isForUpdate
public boolean isForUpdate()
Is this ResultSet or it's source result set for update This method will be overriden in the inherited Classes if it is true- Specified by:
isForUpdate
in interfaceNoPutResultSet
- Returns:
- Whether or not the result set is for update.
-
checkCancellationFlag
public void checkCancellationFlag() throws StandardException
Checks whether the currently executing statement has been cancelled. This is done by checking the statement's allocated StatementContext object.- Throws:
StandardException
- See Also:
StatementContext
-
addWarning
public final void addWarning(java.sql.SQLWarning w)
Description copied from interface:ResultSet
Add a warning to this result set.- Specified by:
addWarning
in interfaceResultSet
- Parameters:
w
- the warning to add
-
getWarnings
public final java.sql.SQLWarning getWarnings()
Description copied from interface:ResultSet
Return the set of warnings generated during the execution of this result set. The warnings are cleared once this call returns.- Specified by:
getWarnings
in interfaceResultSet
-
toXML
public org.w3c.dom.Element toXML(org.w3c.dom.Element parentNode, java.lang.String tag) throws java.lang.Exception
Description copied from interface:ResultSet
Produce an xml image of this ResultSet and its descendant ResultSets. Appends an element to the parentNode and returns the appended element.
-
toXML
public static org.w3c.dom.Element toXML(org.w3c.dom.Element parentNode, java.lang.String childTag, ResultSet rs) throws java.lang.Exception
Pretty-print a ResultSet as an xml child of a parent node. Return the node representing the ResultSet child.
- Throws:
java.lang.Exception
-
stripPackage
private static java.lang.String stripPackage(java.lang.String className)
Strip the package location from a class name
-
childrenToXML
public static org.w3c.dom.Element childrenToXML(org.w3c.dom.Element outerNode, ResultSet outerRS) throws java.lang.Exception
Pretty-print the inner ResultSet fields inside an outer ResultSet. Returns the outerNode.
- Throws:
java.lang.Exception
-
findResultSetFields
private static void findResultSetFields(java.util.ArrayList<java.lang.reflect.Field> fieldList, java.lang.Class<?> klass) throws java.lang.Exception
Find all fields of type ResultSet.
- Throws:
java.lang.Exception
-
-