Source Code Cross Referenced for Transaction.java in  » Database-ORM » ODAL » com » completex » objective » components » persistency » transact » 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 ORM » ODAL » com.completex.objective.components.persistency.transact 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         *  Objective Database Abstraction Layer (ODAL)
003:         *  Copyright (c) 2004, The ODAL Development Group
004:         *  All rights reserved.
005:         *  For definition of the ODAL Development Group please refer to LICENCE.txt file
006:         *
007:         *  Distributable under LGPL license.
008:         *  See terms of license at gnu.org.
009:         */package com.completex.objective.components.persistency.transact;
010:
011:        import java.sql.CallableStatement;
012:        import java.sql.Connection;
013:        import java.sql.PreparedStatement;
014:        import java.sql.SQLException;
015:        import java.sql.Statement;
016:        import java.util.List;
017:
018:        /**
019:         * @author Gennady Krizhevsky
020:         */
021:        public interface Transaction {
022:
023:            NullTransaction NULL_TRANSACTION = new NullTransaction();
024:
025:            /**
026:             *
027:             * @param sql
028:             * @return PreparedStatement
029:             * @throws SQLException
030:             */
031:            PreparedStatement prepareStatement(String sql) throws SQLException;
032:
033:            /**
034:             * Release statement if cached
035:             *
036:             * @param statement
037:             * @throws SQLException
038:             */
039:            void releaseStatement(PreparedStatement statement)
040:                    throws SQLException;
041:
042:            /**
043:             *
044:             * @return Connection
045:             */
046:            Connection getConnection();
047:
048:            /**
049:             * Commit transaction
050:             *
051:             * @throws SQLException
052:             */
053:            void commit() throws SQLException;
054:
055:            /**
056:             * Rollback transaction
057:             *
058:             * @throws SQLException
059:             */
060:            void rollback() throws SQLException;
061:
062:            public void commitUnchecked();
063:
064:            public void rollbackUnchecked();
065:
066:            /**
067:             * Rollback transaction and suppress exceptions
068:             *
069:             */
070:            void rollbackSilently();
071:
072:            /**
073:             * Flush all batch updates
074:             *
075:             * @return List of arrays of return codes produced by executeBatch() 
076:             * @throws SQLException
077:             */
078:            List flush() throws SQLException;
079:
080:            /**
081:             * Proxy for connection.createStatement()
082:             *
083:             * @return created statement
084:             * @throws SQLException
085:             */
086:            Statement createStatement() throws SQLException;
087:
088:            /**
089:             *
090:             * @return String representation of connection
091:             */
092:            String connectionToString();
093:
094:            /**
095:             * Add listener to transaction events
096:             *
097:             * @param key
098:             * @param listener
099:             */
100:            void addListerner(Object key, TransactionListener listener);
101:
102:            /**
103:             * Returns listener associated with key
104:             * 
105:             * @param key
106:             * @return listener associated with key
107:             */
108:            TransactionListener getListener(Object key);
109:
110:            /**
111:             * Returns true if there is listener associated with key
112:             * 
113:             * @param key
114:             * @return true if there is listener associated with key
115:             */
116:            boolean containsListener(Object key);
117:
118:            /**
119:             * Remove  listener associated with key
120:             *
121:             * @param key
122:             */
123:            void removeListerner(Object key);
124:
125:            /**
126:             *
127:             * @return number of registered listeners
128:             */
129:            int listenersSize();
130:
131:            /**
132:             * Unregister all listeners
133:             */
134:            void clearListerners();
135:
136:            /**
137:             *
138:             * @param sql
139:             * @return prepared CallableStatement
140:             * @throws SQLException
141:             */
142:            CallableStatement prepareCall(String sql) throws SQLException;
143:
144:            //
145:            //
146:            //  NullTransaction
147:            //
148:            //
149:            static class NullTransaction implements  Transaction {
150:                public PreparedStatement prepareStatement(String sql)
151:                        throws SQLException {
152:                    return null;
153:                }
154:
155:                public void releaseStatement(PreparedStatement statement)
156:                        throws SQLException {
157:
158:                }
159:
160:                public Connection getConnection() {
161:                    return null;
162:                }
163:
164:                public void commit() throws SQLException {
165:
166:                }
167:
168:                public void rollback() throws SQLException {
169:
170:                }
171:
172:                public void commitUnchecked() {
173:
174:                }
175:
176:                public void rollbackUnchecked() {
177:
178:                }
179:
180:                public void rollbackSilently() {
181:
182:                }
183:
184:                public List flush() throws SQLException {
185:                    return null;
186:                }
187:
188:                public Statement createStatement() throws SQLException {
189:                    return null;
190:                }
191:
192:                public String connectionToString() {
193:                    return null;
194:                }
195:
196:                public void addListerner(Object key,
197:                        TransactionListener listener) {
198:                }
199:
200:                public TransactionListener getListener(Object key) {
201:                    return null;
202:                }
203:
204:                public boolean containsListener(Object key) {
205:                    return false;
206:                }
207:
208:                public void removeListerner(Object key) {
209:
210:                }
211:
212:                public int listenersSize() {
213:                    return 0;
214:                }
215:
216:                public void clearListerners() {
217:
218:                }
219:
220:                public CallableStatement prepareCall(String sql)
221:                        throws SQLException {
222:                    return null;
223:                }
224:            }
225:
226:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.