Source Code Cross Referenced for Script.java in  » Database-JDBC-Connection-Pool » proxool » org » logicalcobwebs » dbscript » 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 JDBC Connection Pool » proxool » org.logicalcobwebs.dbscript 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * This software is released under a licence similar to the Apache Software Licence.
003:         * See org.logicalcobwebs.proxool.package.html for details.
004:         * The latest version is available at http://proxool.sourceforge.net
005:         */
006:        package org.logicalcobwebs.dbscript;
007:
008:        import java.util.List;
009:        import java.util.Properties;
010:        import java.util.Vector;
011:
012:        /**
013:         * Defines a set of {@link #getCommands commands} to run. And which
014:         * {@link #getDriver driver} to use. And its {@link #getInfo configuration}.
015:         *
016:         * @version $Revision: 1.6 $, $Date: 2003/03/03 11:12:03 $
017:         * @author Bill Horsman (bill@logicalcobwebs.co.uk)
018:         * @author $Author: billhorsman $ (current maintainer)
019:         * @since Proxool 0.5
020:         */
021:        class Script {
022:
023:            private String name;
024:
025:            private String driver;
026:
027:            private String url;
028:
029:            private Properties info = new Properties();
030:
031:            private List commands = new Vector();
032:
033:            /**
034:             * Add a command to the script.
035:             * @param command to add
036:             */
037:            protected void addCommand(Command command) {
038:                commands.add(command);
039:            }
040:
041:            /**
042:             * Get all the commands, in the order in which they were added
043:             * @return list of commands
044:             */
045:            protected Command[] getCommands() {
046:                return (Command[]) commands
047:                        .toArray(new Command[commands.size()]);
048:            }
049:
050:            /**
051:             * So we can recognise this script in the logs
052:             * @return name
053:             */
054:            protected String getName() {
055:                return name;
056:            }
057:
058:            /**
059:             * @see #getName
060:             */
061:            protected void setName(String name) {
062:                this .name = name;
063:            }
064:
065:            /**
066:             * The URL to pass to the Driver
067:             */
068:            protected String getUrl() {
069:                return url;
070:            }
071:
072:            /**
073:             * @see #getUrl
074:             */
075:            protected void setUrl(String url) {
076:                this .url = url;
077:            }
078:
079:            /**
080:             * The driver to use
081:             * @return the driver
082:             */
083:            protected String getDriver() {
084:                return driver;
085:            }
086:
087:            /**
088:             * @see #getDriver
089:             */
090:            protected void setDriver(String driver) {
091:                this .driver = driver;
092:            }
093:
094:            /**
095:             * Configuration of the Driver
096:             * @return properties
097:             */
098:            protected Properties getInfo() {
099:                return info;
100:            }
101:
102:            /**
103:             * Add a new property
104:             * @param name name of property
105:             * @param value value of property
106:             */
107:            protected void addProperty(String name, String value) {
108:                info.setProperty(name, value);
109:            }
110:
111:        }
112:
113:        /*
114:         Revision history:
115:         $Log: Script.java,v $
116:         Revision 1.6  2003/03/03 11:12:03  billhorsman
117:         fixed licence
118:
119:         Revision 1.5  2003/02/19 15:14:21  billhorsman
120:         fixed copyright (copy and paste error,
121:         not copyright change)
122:
123:         Revision 1.4  2002/11/09 15:59:52  billhorsman
124:         fix doc
125:
126:         Revision 1.3  2002/11/02 14:22:16  billhorsman
127:         Documentation
128:
129:         Revision 1.2  2002/11/02 13:57:34  billhorsman
130:         checkstyle
131:
132:         Revision 1.1  2002/11/02 11:29:53  billhorsman
133:         new script runner for testing
134:
135:         */
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.