001: /*
002: * $Header: /cvsroot/mvnforum/myvietnam/src/net/myvietnam/mvncore/db/DBOptions.java,v 1.26 2007/04/05 09:13:49 phuongpdd Exp $
003: * $Author: phuongpdd $
004: * $Revision: 1.26 $
005: * $Date: 2007/04/05 09:13:49 $
006: *
007: * ====================================================================
008: *
009: * Copyright (C) 2002-2006 by MyVietnam.net
010: *
011: * All copyright notices regarding MyVietnam and MyVietnam CoreLib
012: * MUST remain intact in the scripts and source code.
013: *
014: * This library is free software; you can redistribute it and/or
015: * modify it under the terms of the GNU Lesser General Public
016: * License as published by the Free Software Foundation; either
017: * version 2.1 of the License, or (at your option) any later version.
018: *
019: * This library is distributed in the hope that it will be useful,
020: * but WITHOUT ANY WARRANTY; without even the implied warranty of
021: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
022: * Lesser General Public License for more details.
023: *
024: * You should have received a copy of the GNU Lesser General Public
025: * License along with this library; if not, write to the Free Software
026: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
027: *
028: * Correspondence and Marketing Questions can be sent to:
029: * info at MyVietnam net
030: *
031: * @author: Phong Ta Quoc
032: */
033: package net.myvietnam.mvncore.db;
034:
035: public class DBOptions {
036:
037: public static final String MAIN = "Main";
038:
039: protected String dbManagerName;
040: protected int dbType;
041: protected boolean useDataSource;
042: protected String dataSourceName;
043: protected String driverClass;
044: protected String dbUrl;
045: protected String username;
046: protected String password;
047: protected int conMax;
048: protected int timeout;
049: protected int refreshMinutes;
050:
051: public DBOptions(String dbManagerName) {
052: this .dbManagerName = dbManagerName;
053: }
054:
055: public String getDbManagerName() {
056: return dbManagerName;
057: }
058:
059: public void setDbType(int dbType) {
060: this .dbType = dbType;
061: }
062:
063: public int getDbType() {
064: return dbType;
065: }
066:
067: public void setUseDataSource(boolean useDataSource) {
068: this .useDataSource = useDataSource;
069: }
070:
071: public boolean isUseDataSource() {
072: return useDataSource;
073: }
074:
075: public void setDataSourceName(String dataSourceName) {
076: this .dataSourceName = dataSourceName;
077: }
078:
079: public String getDataSourceName() {
080: return dataSourceName;
081: }
082:
083: public void setDriverClass(String driverClass) {
084: this .driverClass = driverClass;
085: }
086:
087: public String getDriverClass() {
088: return driverClass;
089: }
090:
091: public void setDbUrl(String dbUrl) {
092: this .dbUrl = dbUrl;
093: }
094:
095: public String getDbUrl() {
096: return dbUrl;
097: }
098:
099: public void setUsername(String username) {
100: this .username = username;
101: }
102:
103: public String getUsername() {
104: return username;
105: }
106:
107: public void setPassword(String password) {
108: this .password = password;
109: }
110:
111: public String getPassword() {
112: return password;
113: }
114:
115: public void setConMax(int conMax) {
116: this .conMax = conMax;
117: }
118:
119: public int getConMax() {
120: return conMax;
121: }
122:
123: public void setTimeout(int timeout) {
124: this .timeout = timeout;
125: }
126:
127: public int getTimeout() {
128: return timeout;
129: }
130:
131: public void setRefreshMinutes(int refreshMinutes) {
132: this .refreshMinutes = refreshMinutes;
133: }
134:
135: public int getRefreshMinutes() {
136: return refreshMinutes;
137: }
138:
139: }
|