Java Doc for JDBCUtil.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » util » 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 » Workflow Engines » wfmopen 2.1.1 » de.danet.an.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.danet.an.util.JDBCUtil

JDBCUtil
public class JDBCUtil (Code)
Collection of JDBC utilities. This class adds common utilitites for a JDBC environment.

Inner Class :final public static class DBProperties implements Serializable



Method Summary
public static  voidcloseAll(ResultSet rs, Statement st, Connection con)
     Close a connection, a prepared statement or a statement and a result set, if allocated, i.e.
public static  DBPropertiesdbProperties(DataSource dataSource)
     Return the database properties for the given data source and connection.
public static  DBPropertiesdbProperties(DataSource dataSource, Connection con)
     Return the database properties for the given data source and connection.
public static  ObjectgetBinary(ResultSet rs, int offset)
     Retrieves the byte array from the ResultSet, create an object and returns it.
Parameters:
  rs - a result set.
Parameters:
  offset - an int offset for the ResultSet an Object.
public static  IntegergetInteger(ResultSet rs, int offset)
     Retrieves the Integer from the ResultSet, create an object and returns it.
Parameters:
  rs - a result set.
Parameters:
  offset - an int offset for the ResultSet an Integer or null.
public static  LonggetLong(ResultSet rs, int offset)
     Retrieves the Long from the ResultSet, create an object and returns it.
Parameters:
  rs - a result set.
Parameters:
  offset - an int offset for the ResultSet a Long or null.
public static  StringgetString(DataSource dataSource, ResultSet rs, int offset)
     Retrieves a string from the result set.
public static  intgetTableColumnSize(Connection dbConnection, String tableName, String columnName, int defaultValue)
     Retrieves the defined size of a table column by using the database meta schema.
Parameters:
  dbConnection - the connection to be used for requesting the meta schema
Parameters:
  tableName - the table name where the column is located
Parameters:
  columnName - the name of the column for the request
Parameters:
  defaultValue - if the database driver delivers an illegallength (0) for a varchar type column, this value is returned.
public static  DataSourcerefreshDS(DataSource dsToTest, String dbName)
     Refresh the Data Source of the database.



Method Detail
closeAll
public static void closeAll(ResultSet rs, Statement st, Connection con) throws SQLException(Code)
Close a connection, a prepared statement or a statement and a result set, if allocated, i.e. if != null.
Parameters:
  rs - a result set or null.
Parameters:
  st - a prepared statement, statement or null
Parameters:
  con - a connection or null.
throws:
  SQLException - if a sql error occurs.



dbProperties
public static DBProperties dbProperties(DataSource dataSource) throws SQLException(Code)
Return the database properties for the given data source and connection.
Parameters:
  dataSource - the data source the database properties
throws:
  SQLException - if an error occurs while obtaining therequired information



dbProperties
public static DBProperties dbProperties(DataSource dataSource, Connection con) throws SQLException(Code)
Return the database properties for the given data source and connection.
Parameters:
  dataSource - the data source
Parameters:
  con - the connection the database properties
throws:
  SQLException - if an error occurs while obtaining therequired information



getBinary
public static Object getBinary(ResultSet rs, int offset) throws IOException, ClassNotFoundException, SQLException(Code)
Retrieves the byte array from the ResultSet, create an object and returns it.
Parameters:
  rs - a result set.
Parameters:
  offset - an int offset for the ResultSet an Object. On the client side the object must be casted.
throws:
  IOException - any of the usual Input/Output related exceptions.
throws:
  ClassNotFoundException - if class of a serialized objectcannot be found.
throws:
  SQLException - if a sql error occurs.



getInteger
public static Integer getInteger(ResultSet rs, int offset) throws SQLException(Code)
Retrieves the Integer from the ResultSet, create an object and returns it.
Parameters:
  rs - a result set.
Parameters:
  offset - an int offset for the ResultSet an Integer or null.
throws:
  SQLException - if a sql error occurs.



getLong
public static Long getLong(ResultSet rs, int offset) throws SQLException(Code)
Retrieves the Long from the ResultSet, create an object and returns it.
Parameters:
  rs - a result set.
Parameters:
  offset - an int offset for the ResultSet a Long or null.
throws:
  SQLException - if a sql error occurs.



getString
public static String getString(DataSource dataSource, ResultSet rs, int offset) throws IOException, SQLException(Code)
Retrieves a string from the result set. For drivers that are known not to support getString for all string lengths, getCharacterStream will be used. This method should be used instead of ResultSet.getString if the field is of type LONGVARCHAR.
Parameters:
  dataSource - the data soure that had been used to obtainthe connection.
Parameters:
  rs - a result set.
Parameters:
  offset - an int offset for the ResultSet the String or null.
throws:
  IOException - any of the usual Input/Output related exceptions.
throws:
  SQLException - if a sql error occurs.



getTableColumnSize
public static int getTableColumnSize(Connection dbConnection, String tableName, String columnName, int defaultValue) throws SQLException(Code)
Retrieves the defined size of a table column by using the database meta schema.
Parameters:
  dbConnection - the connection to be used for requesting the meta schema
Parameters:
  tableName - the table name where the column is located
Parameters:
  columnName - the name of the column for the request
Parameters:
  defaultValue - if the database driver delivers an illegallength (0) for a varchar type column, this value is returned. the column size.
throws:
  SQLException - if a database error occurs.



refreshDS
public static DataSource refreshDS(DataSource dsToTest, String dbName) throws NamingException(Code)
Refresh the Data Source of the database.
Parameters:
  dsToTest - Data source to test
Parameters:
  dbName - jndi name of the database the data source
throws:
  NamingException - if the resource is not present.



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.