Source Code Cross Referenced for DBBindBeanInfo.java in  » Groupware » hipergate » com » knowgate » dataobjs » 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 » Groupware » hipergate » com.knowgate.dataobjs 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:          Copyright (C) 2003  Know Gate S.L. All rights reserved.
003:                              C/Oņa, 107 1š2 28050 Madrid (Spain)
004:
005:          Redistribution and use in source and binary forms, with or without
006:          modification, are permitted provided that the following conditions
007:          are met:
008:
009:          1. Redistributions of source code must retain the above copyright
010:             notice, this list of conditions and the following disclaimer.
011:
012:          2. The end-user documentation included with the redistribution,
013:             if any, must include the following acknowledgment:
014:             "This product includes software parts from hipergate
015:             (http://www.hipergate.org/)."
016:             Alternately, this acknowledgment may appear in the software itself,
017:             if and wherever such third-party acknowledgments normally appear.
018:
019:          3. The name hipergate must not be used to endorse or promote products
020:             derived from this software without prior written permission.
021:             Products derived from this software may not be called hipergate,
022:             nor may hipergate appear in their name, without prior written
023:             permission.
024:
025:          This library is distributed in the hope that it will be useful,
026:          but WITHOUT ANY WARRANTY; without even the implied warranty of
027:          MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
028:
029:          You should have received a copy of hipergate License with this code;
030:          if not, visit http://www.hipergate.org or mail to info@hipergate.org
031:         */
032:
033:        package com.knowgate.dataobjs;
034:
035:        /**
036:         * @author Sergio Montoro Ten
037:         * @version 1.0
038:         */
039:
040:        import com.knowgate.dataobjs.DBBind;
041:
042:        import java.awt.Image;
043:
044:        import java.lang.ClassNotFoundException;
045:        import java.lang.NoSuchMethodException;
046:
047:        import java.beans.SimpleBeanInfo;
048:        import java.beans.BeanDescriptor;
049:        import java.beans.MethodDescriptor;
050:
051:        public class DBBindBeanInfo extends SimpleBeanInfo {
052:
053:            public DBBindBeanInfo() {
054:            }
055:
056:            public BeanDescriptor getBeanDescriptor() {
057:                return new BeanDescriptor(beanClass);
058:            }
059:
060:            public Image getIcon(int iconKind) {
061:                switch (iconKind) {
062:                case SimpleBeanInfo.ICON_MONO_16x16:
063:                    return loadImage("dbbind16m.gif");
064:                case SimpleBeanInfo.ICON_COLOR_16x16:
065:                    return loadImage("dbbind16c.gif");
066:                case SimpleBeanInfo.ICON_MONO_32x32:
067:                    return loadImage("dbbind32m.gif");
068:                case SimpleBeanInfo.ICON_COLOR_32x32:
069:                    return loadImage("dbbind32c.gif");
070:                }
071:                return null;
072:            }
073:
074:            public MethodDescriptor[] getMethodDescriptors() {
075:                try {
076:                    Class voidParams[] = {};
077:                    Class nextValParams[] = {
078:                            Class.forName("java.sql.Connection"),
079:                            Class.forName("String") };
080:                    Class getTableParams[] = { Class.forName("String") };
081:                    Class getConnectionParams[] = { Class.forName("String") };
082:                    Class escapeParams[] = { Class.forName("java.util.Date"),
083:                            Class.forName("String") };
084:                    Class existsParams[] = {
085:                            Class.forName("com.knowgate.jdc.JDCConnection"),
086:                            Class.forName("String"), Class.forName("String") };
087:                    Class getDataModelParams[] = { Class
088:                            .forName("com.knowgate.jdc.JDCConnection") };
089:
090:                    MethodDescriptor closeBind = new MethodDescriptor(
091:                            DBBind.class.getMethod("close", voidParams));
092:                    MethodDescriptor nextVal = new MethodDescriptor(
093:                            DBBind.class.getMethod("nextVal", nextValParams));
094:                    MethodDescriptor getTable = new MethodDescriptor(
095:                            DBBind.class.getMethod("getTable", getTableParams));
096:                    MethodDescriptor getConnection = new MethodDescriptor(
097:                            DBBind.class.getMethod("getConnection",
098:                                    getConnectionParams));
099:                    MethodDescriptor getDataModelVersion = new MethodDescriptor(
100:                            DBBind.class.getMethod("getDatabaseProductName",
101:                                    getDataModelParams));
102:                    MethodDescriptor getDataModelVersionNumber = new MethodDescriptor(
103:                            DBBind.class.getMethod("getDatabaseProductName",
104:                                    getDataModelParams));
105:                    MethodDescriptor getDatabaseProductName = new MethodDescriptor(
106:                            DBBind.class.getMethod("getDatabaseProductName",
107:                                    voidParams));
108:                    MethodDescriptor getTime = new MethodDescriptor(
109:                            DBBind.class.getMethod("getTime", voidParams));
110:                    MethodDescriptor connectionPool = new MethodDescriptor(
111:                            DBBind.class
112:                                    .getMethod("connectionPool", voidParams));
113:                    MethodDescriptor escape = new MethodDescriptor(DBBind.class
114:                            .getMethod("escape", escapeParams));
115:                    MethodDescriptor exists = new MethodDescriptor(DBBind.class
116:                            .getMethod("exists", voidParams));
117:
118:                    MethodDescriptor rv[] = { closeBind, nextVal, getTable,
119:                            getConnection, getDataModelVersion,
120:                            getDataModelVersionNumber, getDatabaseProductName,
121:                            getTime, connectionPool, escape, exists };
122:                    return rv;
123:                } catch (ClassNotFoundException e) {
124:                    throw new Error(e.toString());
125:                } catch (NoSuchMethodException e) {
126:                    throw new Error(e.toString());
127:                }
128:            }
129:
130:            private final static Class beanClass = DBBind.class;
131:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.