View Javadoc

1   /* ==============================================================================
2    *   JDBCAdmin, data management software.
3    *   Copyright (C) 2005  Norsys S.A
4    *
5    *   This library is free software; you can redistribute it and/or
6    *   modify it under the terms of the GNU Lesser General Public
7    *   License as published by the Free Software Foundation; either
8    *   version 2.1 of the License, or (at your option) any later version.
9    *
10   *   This library is distributed in the hope that it will be useful,
11   *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   *   Lesser General Public License for more details.
14   *
15   *   You should have received a copy of the GNU Lesser General Public
16   *   License along with this library; if not, write to the Free Software
17   *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18   * ==============================================================================
19   */
20  package jdbcadmin.core.data;
21  
22  import java.io.Serializable;
23  
24  
25  
26  /***
27   * Informations for a JDBC connection.
28   * @author Thomas Recloux (trecloux@norsys.fr)
29   */
30  public class ConnectionInfo implements Serializable {
31  
32      /* ---------------------------------------------- Attributes */
33  	/*** Connection mode. */
34      private String mode;
35      /*** Database URL . */
36      private String url;
37      /*** JDBC Driver class name. */
38      private String driverName;
39      /*** Database user. */
40      private String userName;
41      /*** Database password. */
42      private String userPassword;
43      /*** JNDI Datasource name. */
44      private String dataSourceJndiName;
45      /*** Drivers jar file data. */
46      private byte [] driverJarData;
47  
48  
49      /* ---------------------------------------------- Constructors */
50  
51      /*** Simple Constructor. */
52      public ConnectionInfo() {
53      }
54      /* ---------------------------------------------- Accessors */
55  
56  
57      /***
58       * @return Returns the dataSourceJndiName.
59       */
60      public String getDataSourceJndiName() {
61          return dataSourceJndiName;
62      }
63      /***
64       * @param aDataSourceJndiName The dataSourceJndiName to set.
65       */
66      public void setDataSourceJndiName(String aDataSourceJndiName) {
67          dataSourceJndiName = aDataSourceJndiName;
68      }
69      /***
70       * @return Returns the driverJarData.
71       */
72      public byte[] getDriverJarData() {
73          return driverJarData;
74      }
75      /***
76       * @param aDriverJarData The driverJarData to set.
77       */
78      public void setDriverJarData(byte[] aDriverJarData) {
79          driverJarData = aDriverJarData;
80      }
81      /***
82       * @return Returns the driverName.
83       */
84      public String getDriverName() {
85          return driverName;
86      }
87      /***
88       * @param aDriverName The driverName to set.
89       */
90      public void setDriverName(String aDriverName) {
91          driverName = aDriverName;
92      }
93      /***
94       * @return Returns the url.
95       */
96      public String getUrl() {
97          return url;
98      }
99      /***
100      * @param aUrl The url to set.
101      */
102     public void setUrl(String aUrl) {
103         url = aUrl;
104     }
105     /***
106      * @return Returns the userName.
107      */
108     public String getUserName() {
109         return userName;
110     }
111     /***
112      * @param aUserName The userName to set.
113      */
114     public void setUserName(String aUserName) {
115         userName = aUserName;
116     }
117     /***
118      * @return Returns the userPassword.
119      */
120     public String getUserPassword() {
121         return userPassword;
122     }
123     /***
124      * @param aUserPassword The userPassword to set.
125      */
126     public void setUserPassword(String aUserPassword) {
127         userPassword = aUserPassword;
128     }
129 
130 	/***
131 	 * @return Returns the mode.
132 	 */
133 	public String getMode() {
134 		return mode;
135 	}
136 	/***
137 	 * @param mode The mode to set.
138 	 */
139 	public void setMode(String mode) {
140 		this.mode = mode;
141 	}
142 }