Source Code Cross Referenced for FilterDataHandler.java in  » Scripting » jython » com » ziclix » python » sql » 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 » Scripting » jython » com.ziclix.python.sql 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Jython Database Specification API 2.0
003:         *
004:         * $Id: FilterDataHandler.java 2414 2005-02-23 04:26:23Z bzimmer $
005:         *
006:         * Copyright (c) 2001 brian zimmer <bzimmer@ziclix.com>
007:         *
008:         */
009:        package com.ziclix.python.sql;
010:
011:        import org.python.core.Py;
012:        import org.python.core.PyList;
013:        import org.python.core.PyObject;
014:
015:        import java.sql.PreparedStatement;
016:        import java.sql.ResultSet;
017:        import java.sql.SQLException;
018:        import java.sql.Statement;
019:
020:        /**
021:         * A FilterDataHandler contains some other DataHandler, which it uses
022:         * as its basic source of functionality, possibly transforming the calls
023:         * along the way or providing additional functionality. The class FilterDataHandler
024:         * itself simply overrides all methods of DataHandler with versions that
025:         * pass all requests to the contained data handler.
026:         *
027:         * @author brian zimmer
028:         * @author last revised by $Author: bzimmer $
029:         * @version $Revision: 2414 $
030:         */
031:        public abstract class FilterDataHandler extends DataHandler {
032:
033:            private DataHandler delegate;
034:
035:            /**
036:             * Constructor FilterDataHandler
037:             *
038:             * @param delegate
039:             */
040:            public FilterDataHandler(DataHandler delegate) {
041:                this .delegate = delegate;
042:            }
043:
044:            /**
045:             * Returns the row id of the last executed statement.
046:             *
047:             * @param stmt
048:             * @return PyObject
049:             * @throws SQLException
050:             */
051:            public PyObject getRowId(Statement stmt) throws SQLException {
052:                return this .delegate.getRowId(stmt);
053:            }
054:
055:            /**
056:             * Method preExecute
057:             *
058:             * @param stmt
059:             * @throws SQLException
060:             */
061:            public void preExecute(Statement stmt) throws SQLException {
062:                this .delegate.preExecute(stmt);
063:            }
064:
065:            /**
066:             * Method postExecute
067:             *
068:             * @param stmt
069:             * @throws SQLException
070:             */
071:            public void postExecute(Statement stmt) throws SQLException {
072:                this .delegate.postExecute(stmt);
073:            }
074:
075:            /**
076:             * Method setJDBCObject
077:             *
078:             * @param stmt
079:             * @param index
080:             * @param object
081:             * @throws SQLException
082:             */
083:            public void setJDBCObject(PreparedStatement stmt, int index,
084:                    PyObject object) throws SQLException {
085:                this .delegate.setJDBCObject(stmt, index, object);
086:            }
087:
088:            /**
089:             * Method setJDBCObject
090:             *
091:             * @param stmt
092:             * @param index
093:             * @param object
094:             * @param type
095:             * @throws SQLException
096:             */
097:            public void setJDBCObject(PreparedStatement stmt, int index,
098:                    PyObject object, int type) throws SQLException {
099:                this .delegate.setJDBCObject(stmt, index, object, type);
100:            }
101:
102:            /**
103:             * Method getPyObject
104:             *
105:             * @param set
106:             * @param col
107:             * @param type
108:             * @return PyObject
109:             * @throws SQLException
110:             */
111:            public PyObject getPyObject(ResultSet set, int col, int type)
112:                    throws SQLException {
113:                return this .delegate.getPyObject(set, col, type);
114:            }
115:
116:            /**
117:             * Returns a list of datahandlers chained together through the use of delegation.
118:             *
119:             * @return a list of datahandlers chained together through the use of delegation
120:             */
121:            public PyObject __chain__() {
122:                PyList list = new PyList();
123:                DataHandler handler = this ;
124:                while (handler != null) {
125:                    list.append(Py.java2py(handler));
126:                    if (handler instanceof  FilterDataHandler) {
127:                        handler = ((FilterDataHandler) handler).delegate;
128:                    } else {
129:                        handler = null;
130:                    }
131:                }
132:                return list;
133:            }
134:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.