Java Doc for JDBCDisplayUtil.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » tools » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db derby 10.2 » org.apache.derby.tools 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.tools.JDBCDisplayUtil

All known Subclasses:   org.apache.derbyTesting.functionTests.util.JDBCTestDisplayUtil,
JDBCDisplayUtil
public class JDBCDisplayUtil (Code)
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.
author:
   ames



Field Summary
public static  booleanshowSelectCount
    


Method Summary
public static  intDisplayBanner(PrintWriter out, ResultSetMetaData rsmd)
     Print a banner containing the column labels separated with '|'s and a line of '-'s.
public static  intDisplayBanner(PrintStream out, ResultSetMetaData rsmd)
    
public static  voidDisplayCurrentRow(PrintWriter out, ResultSet rs, Connection conn)
     Display the current row of the result set along with a banner.
public static  voidDisplayCurrentRow(PrintStream out, ResultSet rs, Connection conn)
    
public static  voidDisplayNextRow(PrintWriter out, ResultSet rs, Connection conn)
     Fetch the next row of the result set, and if it exists format and display a banner and the row.
public static  voidDisplayNextRow(PrintStream out, ResultSet rs, Connection conn)
    
public static  voidDisplayResults(PrintWriter out, Statement stmt, Connection conn)
     Pretty-print the results of a statement that has been executed. If it is a select, gathers and prints the results.
public static  voidDisplayResults(PrintWriter out, ResultSet rs, Connection conn, int[] displayColumns, int[] displayColumnWidths)
    
public static  voidDisplayResults(PrintStream out, Statement stmt, Connection conn)
    
public static  voidDisplayResults(PrintStream out, ResultSet rs, Connection conn)
    
static  voidDisplayUpdateCount(PrintWriter out, int count, int indentLevel)
    
static  voidDisplayUpdateCount(PrintStream out, int count, int indentLevel)
    
public static  voidShowException(PrintWriter out, Throwable e)
     Print information about the exception to the given PrintWriter. For non-SQLExceptions, does a stack trace.
public static  voidShowException(PrintStream out, Throwable e)
    
public static  voidShowSQLException(PrintWriter out, SQLException e)
     Print information about the SQL exception to the given PrintWriter.
public static  voidShowSQLException(PrintStream out, SQLException e)
    
public static  voidShowWarnings(PrintWriter out, Connection theConnection)
     Print information about the SQL warnings for the connection to the given PrintWriter.
public static  voidShowWarnings(PrintWriter out, SQLWarning warning)
    
public static  voidShowWarnings(PrintWriter out, ResultSet rs)
     Print information about the SQL warnings for the ResultSet to the given PrintWriter.
public static  voidShowWarnings(PrintWriter out, Statement s)
     Print information about the SQL warnings for the Statement to the given PrintWriter.
public static  voidShowWarnings(PrintStream out, Connection theConnection)
    
public static  voidShowWarnings(PrintStream out, SQLWarning warning)
    
public static  voidShowWarnings(PrintStream out, ResultSet rs)
    
public static  voidShowWarnings(PrintStream out, Statement s)
    
public static  voidcheckNotNull(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.
public static  voiddoTrace(PrintWriter out, Exception e)
     If the property ij.exceptionTrace is true, display the stack trace to the print stream.
public static  voiddoTrace(PrintStream out, Exception e)
    
public static  StringmapNull(String s, String nullValue)
     Map the string to the value if it is null.
public static  voidsetMaxDisplayWidth(int maxDisplayWidth)
    

Field Detail
showSelectCount
public static boolean showSelectCount(Code)





Method Detail
DisplayBanner
public static int DisplayBanner(PrintWriter out, ResultSetMetaData rsmd) throws SQLException(Code)
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.
Parameters:
  out - the place to write to
Parameters:
  rsmd - the ResultSetMetaData to use
exception:
  SQLException - on JDBC access failure



DisplayBanner
public static int DisplayBanner(PrintStream out, ResultSetMetaData rsmd) throws SQLException(Code)



DisplayCurrentRow
public static void DisplayCurrentRow(PrintWriter out, ResultSet rs, Connection conn) throws SQLException(Code)
Display the current row of the result set along with a banner. Assume the result set is on a row.
Parameters:
  out - the place to write to
Parameters:
  rs - the ResultSet in use
Parameters:
  conn - the Connection against which the ResultSet was retrieved
exception:
  SQLException - on JDBC access failure



DisplayCurrentRow
public static void DisplayCurrentRow(PrintStream out, ResultSet rs, Connection conn) throws SQLException(Code)



DisplayNextRow
public static void DisplayNextRow(PrintWriter out, ResultSet rs, Connection conn) throws SQLException(Code)
Fetch the next row of the result set, and if it exists format and display a banner and the row.
Parameters:
  out - the place to write to
Parameters:
  rs - the ResultSet in use
Parameters:
  conn - the Connection against which the ResultSet was retrieved
exception:
  SQLException - on JDBC access failure



DisplayNextRow
public static void DisplayNextRow(PrintStream out, ResultSet rs, Connection conn) throws SQLException(Code)



DisplayResults
public static void DisplayResults(PrintWriter out, Statement stmt, Connection conn) throws SQLException(Code)
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.
Parameters:
  out - the place to write to
Parameters:
  stmt - the Statement to display
Parameters:
  conn - the Connection against which the statement was executed
exception:
  SQLException - on JDBC access failure



DisplayResults
public static void DisplayResults(PrintWriter out, ResultSet rs, Connection conn, int[] displayColumns, int[] displayColumnWidths) throws SQLException(Code)

Parameters:
  out - the place to write to
Parameters:
  rs - the ResultSet to display
Parameters:
  conn - the Connection against which the ResultSet was retrieved
Parameters:
  displayColumns - Column numbers to display, or null if all
Parameters:
  displayColumnWidths - Column widths, in characters, if displayColumns is specified.
exception:
  SQLException - on JDBC access failure



DisplayResults
public static void DisplayResults(PrintStream out, Statement stmt, Connection conn) throws SQLException(Code)



DisplayResults
public static void DisplayResults(PrintStream out, ResultSet rs, Connection conn) throws SQLException(Code)



DisplayUpdateCount
static void DisplayUpdateCount(PrintWriter out, int count, int indentLevel)(Code)

Parameters:
  out - the place to write to
Parameters:
  count - the update count to display
Parameters:
  indentLevel - number of tab stops to indent line



DisplayUpdateCount
static void DisplayUpdateCount(PrintStream out, int count, int indentLevel)(Code)



ShowException
public static void ShowException(PrintWriter out, Throwable e)(Code)
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.
Parameters:
  out - the place to write to
Parameters:
  e - the exception to display



ShowException
public static void ShowException(PrintStream out, Throwable e)(Code)



ShowSQLException
public static void ShowSQLException(PrintWriter out, SQLException e)(Code)
Print information about the SQL exception to the given PrintWriter. Walk the list of exceptions, if any.
Parameters:
  out - the place to write to
Parameters:
  e - the exception to display



ShowSQLException
public static void ShowSQLException(PrintStream out, SQLException e)(Code)



ShowWarnings
public static void ShowWarnings(PrintWriter out, Connection theConnection)(Code)
Print information about the SQL warnings for the connection to the given PrintWriter. Walks the list of exceptions, if any.
Parameters:
  out - the place to write to
Parameters:
  theConnection - the connection that may have warnings.



ShowWarnings
public static void ShowWarnings(PrintWriter out, SQLWarning warning)(Code)

Parameters:
  out - the place to write to
Parameters:
  warning - the SQLWarning



ShowWarnings
public static void ShowWarnings(PrintWriter out, ResultSet rs)(Code)
Print information about the SQL warnings for the ResultSet to the given PrintWriter. Walk the list of exceptions, if any.
Parameters:
  out - the place to write to
Parameters:
  rs - the ResultSet that may have warnings on it



ShowWarnings
public static void ShowWarnings(PrintWriter out, Statement s)(Code)
Print information about the SQL warnings for the Statement to the given PrintWriter. Walks the list of exceptions, if any.
Parameters:
  out - the place to write to
Parameters:
  s - the Statement that may have warnings on it



ShowWarnings
public static void ShowWarnings(PrintStream out, Connection theConnection)(Code)



ShowWarnings
public static void ShowWarnings(PrintStream out, SQLWarning warning)(Code)



ShowWarnings
public static void ShowWarnings(PrintStream out, ResultSet rs)(Code)



ShowWarnings
public static void ShowWarnings(PrintStream out, Statement s)(Code)



checkNotNull
public static void checkNotNull(Object o, String what)(Code)
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.
Parameters:
  o - the object to test
Parameters:
  what - the information to include in the error if it is null



doTrace
public static void doTrace(PrintWriter out, Exception e)(Code)
If the property ij.exceptionTrace is true, display the stack trace to the print stream. Otherwise, do nothing.
Parameters:
  out - the output stream to write to
Parameters:
  e - the exception to display



doTrace
public static void doTrace(PrintStream out, Exception e)(Code)



mapNull
public static String mapNull(String s, String nullValue)(Code)
Map the string to the value if it is null.
Parameters:
  s - the string to test for null
Parameters:
  nullValue - the value to use if s is null if s is non-null, s; else nullValue.



setMaxDisplayWidth
public static void setMaxDisplayWidth(int maxDisplayWidth)(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.