Java Doc for SQLProcessor.java in  » ERP-CRM-Financial » SourceTap-CRM » org » ofbiz » entity » jdbc » 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 » ERP CRM Financial » SourceTap CRM » org.ofbiz.entity.jdbc 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ofbiz.entity.jdbc.SQLProcessor

SQLProcessor
public class SQLProcessor (Code)
SQLProcessor - provides utitlity functions to ease database access
author:
   David E. Jones
version:
   $Revision: 1.8 $
since:
   2.0


Field Summary
public static  ListCONNECTION_TEST_LIST
    
public static  booleanENABLE_TEST
    
public static  intMAX_CONNECTIONS
    
final public static  Stringmodule
    

Constructor Summary
public  SQLProcessor(String helperName)
    
public  SQLProcessor(String helperName, Connection connection)
     Construct an object with an connection given.

Method Summary
public  voidclose()
    
public  voidcommit()
    
public  voidexecQuery(String sql, ExecQueryCallbackFunctionIF aListener)
     Execute a query based on the SQL string given.
public  ResultSetexecuteQuery()
    
public  ResultSetexecuteQuery(String sql)
    
public  intexecuteUpdate()
    
public  intexecuteUpdate(String sql)
    
protected  voidfinalize()
    
public  ConnectiongetConnection()
    
public  PreparedStatementgetPreparedStatement()
    
public  ResultSetgetResultSet()
    
 ResultSetMetaDatagetResultSetMetaData()
    
public  booleannext()
    
public  voidprepareStatement(String sql)
     Prepare a statement.
public  voidprepareStatement(String sql, boolean specifyTypeAndConcur, int resultSetType, int resultSetConcurrency)
     Prepare a statement.
public  voidrollback()
    
public  voidsetBinaryStream(Object field)
     Set the next binding variable of the currently active prepared statement to write the serialized data of 'field' to a BLOB.
public  voidsetValue(String field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(java.sql.Timestamp field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(java.sql.Time field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(java.sql.Date field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(Integer field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(Long field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(Float field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(Double field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(Boolean field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(Object field)
     Set the next binding variable of the currently active prepared statement.
public  voidsetValue(Blob field)
    
public  voidsetValue(Clob field)
    
protected  voidtestConnection(Connection con)
    

Field Detail
CONNECTION_TEST_LIST
public static List CONNECTION_TEST_LIST(Code)
Used for testing connections when test is enabled



ENABLE_TEST
public static boolean ENABLE_TEST(Code)



MAX_CONNECTIONS
public static int MAX_CONNECTIONS(Code)



module
final public static String module(Code)
Module Name Used for debugging




Constructor Detail
SQLProcessor
public SQLProcessor(String helperName)(Code)
Construct an object based on the helper/datasource
Parameters:
  helperName - The datasource helper (see entityengine.xml <datasource name="..">)



SQLProcessor
public SQLProcessor(String helperName, Connection connection)(Code)
Construct an object with an connection given. The connection will not be closed by this SQLProcessor, but may be by some other.
Parameters:
  helperName - The datasource helper (see entityengine.xml <datasource name="..">)
Parameters:
  connection - The connection to be used




Method Detail
close
public void close() throws GenericDataSourceException(Code)
Commit if required and remove all allocated resources
throws:
  GenericDataSourceException -



commit
public void commit() throws GenericDataSourceException(Code)
Commit all modifications
throws:
  GenericDataSourceException -



execQuery
public void execQuery(String sql, ExecQueryCallbackFunctionIF aListener) throws GenericEntityException(Code)
Execute a query based on the SQL string given. For each record of the ResultSet return, execute a callback function
Parameters:
  sql - The SQL string to be executed
Parameters:
  aListener - The callback function object
throws:
  GenericEntityException -



executeQuery
public ResultSet executeQuery() throws GenericDataSourceException(Code)
Execute a query based on the prepared statement The result set of the query
throws:
  GenericDataSourceException -



executeQuery
public ResultSet executeQuery(String sql) throws GenericDataSourceException, GenericEntityException(Code)
Execute a query baed ont SQL string given
Parameters:
  sql - The SQL string to be executed The result set of the query
throws:
  GenericEntityException -
throws:
  GenericDataSourceException -



executeUpdate
public int executeUpdate() throws GenericDataSourceException(Code)
Execute updates The number of rows updated
throws:
  GenericDataSourceException -



executeUpdate
public int executeUpdate(String sql) throws GenericDataSourceException(Code)
Execute update based on the SQL statement given
Parameters:
  sql - SQL statement to be executed
throws:
  GenericDataSourceException -



finalize
protected void finalize() throws Throwable(Code)



getConnection
public Connection getConnection() throws GenericDataSourceException, GenericEntityException(Code)
Get a connection from the ConnectionFactory The connection created
throws:
  GenericDataSourceException -
throws:
  GenericEntityException -



getPreparedStatement
public PreparedStatement getPreparedStatement()(Code)
Getter: get the prepared statement PreparedStatement



getResultSet
public ResultSet getResultSet()(Code)
Getter: get the currently activ ResultSet ResultSet



getResultSetMetaData
ResultSetMetaData getResultSetMetaData()(Code)



next
public boolean next() throws GenericDataSourceException(Code)
Test if there more records available true, if there more records available
throws:
  GenericDataSourceException -



prepareStatement
public void prepareStatement(String sql) throws GenericDataSourceException, GenericEntityException(Code)
Prepare a statement. In case no connection has been given, allocate a new one.
Parameters:
  sql - The SQL statement to be executed
throws:
  GenericDataSourceException -
throws:
  GenericEntityException -



prepareStatement
public void prepareStatement(String sql, boolean specifyTypeAndConcur, int resultSetType, int resultSetConcurrency) throws GenericDataSourceException, GenericEntityException(Code)
Prepare a statement. In case no connection has been given, allocate a new one.
Parameters:
  sql - The SQL statement to be executed
throws:
  GenericDataSourceException -
throws:
  GenericEntityException -



rollback
public void rollback() throws GenericDataSourceException(Code)
Rollback all modifications



setBinaryStream
public void setBinaryStream(Object field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement to write the serialized data of 'field' to a BLOB.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(String field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(java.sql.Timestamp field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(java.sql.Time field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(java.sql.Date field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Integer field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Long field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Float field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Double field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Boolean field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Object field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement.
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Blob field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement
Parameters:
  field -
throws:
  SQLException -



setValue
public void setValue(Clob field) throws SQLException(Code)
Set the next binding variable of the currently active prepared statement
Parameters:
  field -
throws:
  SQLException -



testConnection
protected void testConnection(Connection con) throws GenericEntityException(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.