Save This Page
Home » db-derby-10.5.3.0 » org.apache.derby.tools » [javadoc | source]
org.apache.derby.tools
public class: JDBCDisplayUtil [javadoc | source]
java.lang.Object
   org.apache.derby.tools.JDBCDisplayUtil
This class contains utility methods for displaying JDBC objects and results.

All of the methods are static. The output stream to write to is always passed in, along with the JDBC objects to display.
Field Summary
public static  boolean showSelectCount     
Method from org.apache.derby.tools.JDBCDisplayUtil Summary:
DisplayBanner,   DisplayBanner,   DisplayCurrentRow,   DisplayCurrentRow,   DisplayMultipleResults,   DisplayNextRow,   DisplayNextRow,   DisplayResults,   DisplayResults,   DisplayResults,   DisplayResults,   DisplayUpdateCount,   DisplayUpdateCount,   ShowException,   ShowException,   ShowSQLException,   ShowSQLException,   ShowWarnings,   ShowWarnings,   ShowWarnings,   ShowWarnings,   ShowWarnings,   ShowWarnings,   ShowWarnings,   ShowWarnings,   checkNotNull,   doTrace,   doTrace,   mapNull,   setMaxDisplayWidth
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.derby.tools.JDBCDisplayUtil Detail:
 public static int DisplayBanner(PrintWriter out,
    ResultSetMetaData rsmd) throws SQLException 
    Print a banner containing the column labels separated with '|'s and a line of '-'s. Each field is as wide as the display width reported by the metadata.
 public static int DisplayBanner(PrintStream out,
    ResultSetMetaData rsmd) throws SQLException 
 public static  void DisplayCurrentRow(PrintWriter out,
    ResultSet rs,
    Connection conn) throws SQLException 
    Display the current row of the result set along with a banner. Assume the result set is on a row.
 public static  void DisplayCurrentRow(PrintStream out,
    ResultSet rs,
    Connection conn) throws SQLException 
 public static  void DisplayMultipleResults(PrintWriter out,
    List resultSets,
    Connection conn,
    int[] displayColumns,
    int[] displayColumnWidths) throws SQLException 
 public static  void DisplayNextRow(PrintWriter out,
    ResultSet rs,
    Connection conn) throws SQLException 
    Fetch the next row of the result set, and if it exists format and display a banner and the row.
 public static  void DisplayNextRow(PrintStream out,
    ResultSet rs,
    Connection conn) throws SQLException 
 public static  void DisplayResults(PrintWriter out,
    Statement stmt,
    Connection conn) throws SQLException 
    Pretty-print the results of a statement that has been executed. If it is a select, gathers and prints the results. Display partial results up to the first error. If it is not a SELECT, determine if rows were involved or not, and print the appropriate message.
 public static  void DisplayResults(PrintStream out,
    Statement stmt,
    Connection conn) throws SQLException 
 public static  void DisplayResults(PrintStream out,
    ResultSet rs,
    Connection conn) throws SQLException 
 public static  void DisplayResults(PrintWriter out,
    ResultSet rs,
    Connection conn,
    int[] displayColumns,
    int[] displayColumnWidths) throws SQLException 
 static  void DisplayUpdateCount(PrintWriter out,
    int count,
    int indentLevel) 
 static  void DisplayUpdateCount(PrintStream out,
    int count,
    int indentLevel) 
 public static  void ShowException(PrintWriter out,
    Throwable e) 
    Print information about the exception to the given PrintWriter. For non-SQLExceptions, does a stack trace. For SQLExceptions, print a standard error message and walk the list, if any.
 public static  void ShowException(PrintStream out,
    Throwable e) 
 public static  void ShowSQLException(PrintWriter out,
    SQLException e) 
    Print information about the SQL exception to the given PrintWriter. Walk the list of exceptions, if any.
 public static  void ShowSQLException(PrintStream out,
    SQLException e) 
 public static  void ShowWarnings(PrintWriter out,
    Connection theConnection) 
    Print information about the SQL warnings for the connection to the given PrintWriter. Walks the list of exceptions, if any.
 public static  void ShowWarnings(PrintWriter out,
    SQLWarning warning) 
 public static  void ShowWarnings(PrintWriter out,
    ResultSet rs) 
    Print information about the SQL warnings for the ResultSet to the given PrintWriter. Walk the list of exceptions, if any.
 public static  void ShowWarnings(PrintWriter out,
    Statement s) 
    Print information about the SQL warnings for the Statement to the given PrintWriter. Walks the list of exceptions, if any.
 public static  void ShowWarnings(PrintStream out,
    Connection theConnection) 
 public static  void ShowWarnings(PrintStream out,
    SQLWarning warning) 
 public static  void ShowWarnings(PrintStream out,
    ResultSet rs) 
 public static  void ShowWarnings(PrintStream out,
    Statement s) 
 public static  void checkNotNull(Object o,
    String what) 
    Check if an object is null, and if it is, throw an exception with an informative parameter about what was null. The exception is a run-time exception that is internal to ij.
 public static  void doTrace(PrintWriter out,
    Exception e) 
    If the property ij.exceptionTrace is true, display the stack trace to the print stream. Otherwise, do nothing.
 public static  void doTrace(PrintStream out,
    Exception e) 
 public static String mapNull(String s,
    String nullValue) 
    Map the string to the value if it is null.
 public static  void setMaxDisplayWidth(int maxDisplayWidth)