Java Doc for GenericDatabaseDataSource.java in  » Web-Framework » JAT » com » jat » integration » db » 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 » Web Framework » JAT » com.jat.integration.db 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jat.integration.GenericDataSource
      com.jat.integration.db.GenericDatabaseDataSource

All known Subclasses:   com.jat.integration.db.connectionpool.ConnectionPoolDataSource,  com.jat.integration.db.JndiDataSource,  com.jat.integration.db.JdbcDataSource,
GenericDatabaseDataSource
abstract public class GenericDatabaseDataSource extends GenericDataSource (Code)

Title: JAT

Description: This class implements a generic access to database data source. It contain methods to execute sql statements such as select, update, insert and stored procedure.

Query configuration:
For each query you have to define:

  • name the name of the query
  • value the value of the query (e.g. sql)
  • type (optional) the type of the query (see com.jat.integration.db.QueryDefinition costant field values).
    By default the type of the query is automatically calculated
  • response_plugin (optional) is the class name of an istance of com.jat.integration.db.plugin.CheckReturnPlugin class that checks the response of an insert/modify query or of a stored procedure: if an exception is catched, a rollback will be performed
  • the list of fields (optional) of a query with parameters.
    Note that the number of fields must be exactly as the number of parameters (symbol '?') of the value of query
For each field you have to define: Example:
# a simple query
query1.name = myQueryName
query1.value = select * from dual


# a simple query with parameters
query2.name = myQueryName2
query2.value = select * from myTable where firstField = ? and secondField = ?
query2.field1.name = myFirstParameter
query2.field2.name = mySecondParameter

# calling a stored procedure with an input parameter and an output parameter
query3.name = callMyStoredProcedure
query3.value = { call MY_STORED_PROCEDURE(?,?)}
query3.field1.name = myInputParameter
query3.field2.name = myOutputParameter
query3.field2.output = true

Copyright: Copyright (c) 2004 -2005 Stefano Fratini (stefano.fratini@gmail.com)

Distributed under the terms of the GNU Lesser General Public License, v2.1 or later


author:
   stf
version:
   1.2
since:
   1.2
See Also:   com.jat.integration.DataSource
See Also:   com.jat.integration.db.QueryDefinition




Method Summary
protected  BusinessObjectPropertiescallProcedure(Connection con, QueryDefinition qf, BusinessObjectProperties parameters)
    
final protected  voidclose(Connection con)
    
final protected  voidcommit(Connection con)
    
public  BusinessObjectPropertiesexecute(String queryName, BusinessObjectProperties parameters)
    
public  BusinessObjectPropertyListexecute(MultiBusinessObjectProperties multi)
    
protected  BusinessObjectPropertiesexecute(Connection con, String queryName, BusinessObjectProperties parameters)
    
protected  BusinessObjectPropertiesexecuteQuery(Connection con, QueryDefinition qf, BusinessObjectProperties parameters)
    
protected  CallableStatementgetCallableStatement(QueryDefinition qf, BusinessObjectProperties parameters, Connection con)
    
abstract protected  ConnectiongetConnection()
    
public  BusinessObjectPropertyListgetData(String queryName, BusinessObjectProperties parameters)
    
public  GenericOperationDefinitiongetEmptyOperationDefinition()
    
protected  PreparedStatementgetPreparedStatement(QueryDefinition qf, BusinessObjectProperties parameters, Connection con)
    
protected  BusinessObjectPropertyListgetRows(ResultSet rs)
    
final protected  voidrollback(Connection con)
    
protected  BusinessObjectPropertyListselect(QueryDefinition qf, BusinessObjectProperties parameters)
    



Method Detail
callProcedure
protected BusinessObjectProperties callProcedure(Connection con, QueryDefinition qf, BusinessObjectProperties parameters) throws IntegrationException(Code)



close
final protected void close(Connection con)(Code)



commit
final protected void commit(Connection con) throws SQLException(Code)



execute
public BusinessObjectProperties execute(String queryName, BusinessObjectProperties parameters) throws IntegrationException(Code)



execute
public BusinessObjectPropertyList execute(MultiBusinessObjectProperties multi) throws IntegrationException(Code)



execute
protected BusinessObjectProperties execute(Connection con, String queryName, BusinessObjectProperties parameters) throws IntegrationException(Code)



executeQuery
protected BusinessObjectProperties executeQuery(Connection con, QueryDefinition qf, BusinessObjectProperties parameters) throws IntegrationException(Code)



getCallableStatement
protected CallableStatement getCallableStatement(QueryDefinition qf, BusinessObjectProperties parameters, Connection con) throws IntegrationException, SQLException(Code)



getConnection
abstract protected Connection getConnection() throws SQLException(Code)



getData
public BusinessObjectPropertyList getData(String queryName, BusinessObjectProperties parameters) throws IntegrationException(Code)



getEmptyOperationDefinition
public GenericOperationDefinition getEmptyOperationDefinition()(Code)



getPreparedStatement
protected PreparedStatement getPreparedStatement(QueryDefinition qf, BusinessObjectProperties parameters, Connection con) throws IntegrationException, SQLException(Code)



getRows
protected BusinessObjectPropertyList getRows(ResultSet rs) throws SQLException(Code)



rollback
final protected void rollback(Connection con)(Code)



select
protected BusinessObjectPropertyList select(QueryDefinition qf, BusinessObjectProperties parameters) throws IntegrationException(Code)



Methods inherited from com.jat.integration.GenericDataSource
public void addOperation(GenericOperationDefinition operation)(Code)(Java Doc)
protected Config getConfig() throws Exception(Code)(Java Doc)
abstract public GenericOperationDefinition getEmptyOperationDefinition()(Code)(Java Doc)
protected Hashtable getFieldConfig(Hashtable sec, GenericOperationDefinition operation, int index)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public GenericOperationDefinition getOperation(String name) throws IntegrationException(Code)(Java Doc)
protected Hashtable getOperationConfig(Hashtable sec, GenericOperationDefinition operation, int index)(Code)(Java Doc)
public void init(String name) throws IntegrationException(Code)(Java Doc)
abstract protected void initDataSource() throws IntegrationException(Code)(Java Doc)
protected void initOperations() throws IntegrationException(Code)(Java Doc)
public Enumeration operationNames()(Code)(Java Doc)
public int operationSize()(Code)(Java Doc)
public Enumeration operations()(Code)(Java Doc)
public void persist() throws Exception(Code)(Java Doc)
abstract protected Hashtable putInitProperties(Hashtable hash) throws Exception(Code)(Java Doc)
public GenericOperationDefinition removeOperation(String operation)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.