/Users/lyon/j4p/src/classUtils/pack/util/jdbc/MSSQLJdbcURL.java
|
1 package classUtils.pack.util.jdbc;
2
3 import java.net.InetAddress;
4
5 /**
6 * JdbcURLs for Microsoft MS SQL 2000.
7 * <p>
8 * The outer (abstract) class just defines the port to be 1432 and declares
9 * <tt>public</tt> the proper setters.
10 * <p>
11 * The inner classes declare the proper template for some known drivers.
12 *
13 * @author Cristiano Sadun
14 */
15 public abstract class MSSQLJdbcURL extends JdbcURL {
16
17 /**
18 * A JDBC url template for the Avenir CaveConnect drivers
19 * for MS SQL 2000.
20 * <p>
21 * The template has the form <tt>jdbc:AvenirDriver://$(host):$(port)/$(database);uid=$(user);pwd=$(password)</tt>.
22 */
23 public static class AvenirURL extends MSSQLJdbcURL {
24
25 /**
26 * Constructor for AvenirDriverJDBCURL.
27 * @param template
28 */
29 public AvenirURL() {
30 super("jdbc:AvenirDriver://$(host):$(port)/$(database);uid=$(user);pwd=$(password)");
31 }
32 }
33
34 /**
35 * Constructor for MSSQLJdbcURL.
36 * @param template
37 */
38 public MSSQLJdbcURL(String template) {
39 super(template);
40 setPort(1432);
41 }
42
43 /**
44 * @see classUtils.pack.util.jdbc.JdbcURL#setDatabase(String)
45 */
46 public void setDatabase(String database) {
47 super.setDatabase(database);
48 }
49
50 /**
51 * @see classUtils.pack.util.jdbc.JdbcURL#setHost(InetAddress)
52 */
53 public void setHost(InetAddress host) {
54 super.setHost(host);
55 }
56
57 /**
58 * @see classUtils.pack.util.jdbc.JdbcURL#setPassword(String)
59 */
60 public void setPassword(String password) {
61 super.setPassword(password);
62 }
63
64 /**
65 * @see classUtils.pack.util.jdbc.JdbcURL#setPort(int)
66 */
67 public void setPort(int port) {
68 super.setPort(port);
69 }
70
71 /**
72 * @see classUtils.pack.util.jdbc.JdbcURL#setPort(String)
73 */
74 public void setPort(String port) {
75 super.setPort(port);
76 }
77
78 /**
79 * @see classUtils.pack.util.jdbc.JdbcURL#setUser(String)
80 */
81 public void setUser(String username) {
82 super.setUser(username);
83 }
84
85 }
86