📄 intramartdbdao.java
字号:
/*
* IntramartDBDAO.java
*
* Created on 2002/02/19, 18:47
*/
package jp.co.intra_mart.framework.base.data;
import jp.co.intra_mart.foundation.database.DbsConnection;
/**
* 僀儞僩儔儅乕僩偱愝掕偝傟偨DB傊傾僋僙僗偡傞DAO偱偡丅
* 僀儞僩儔儅乕僩偱愝掕偝傟偨DB傊傾僋僙僗偡傞DAO傪嶌傞応崌丄偙偺僋儔僗傪extends偟傑偡丅
*
* @author INTRAMART
* @version 1.0
* @deprecated 偙偺僋儔僗偱偼側偔{@link LoginGroupDBDAO}傑偨偼
* {@link SystemDBDAO}傪巊梡偟偰偔偩偝偄丅
*/
public class IntramartDBDAO implements DAO {
/**
* 愙懕忣曬
*/
private String connect;
/**
* 僀儞僩儔儅乕僩梡偺DataConnector
*/
private IntramartDBConnector connector;
/**
* 僀儞僩儔儅乕僩偱愝掕偝傟偨DB傊偺僐僱僋僔儑儞
*/
private DbsConnection connection;
/**
* IntramartDBDAO傪怴婯偵惗惉偟傑偡丅
*/
public IntramartDBDAO() {
this.connect = null;
this.connector = null;
this.connection = null;
}
/**
* 僨乕僞儕僜乕僗偵愙懕偡傞帪偺忣曬傪愝掕偟傑偡丅
*
* @param connector 僨乕僞僐僱僋僞
* @param resource 儕僜乕僗
* @param key 僉乕
* @param connect 愙懕忣曬
* @throws DataConnectException 愙懕偵幐攕
*/
public void setConnectInfo(
DataConnector connector,
String resource,
String key,
String connect)
throws DataConnectException {
this.connector = (IntramartDBConnector)connector;
this.connect = connect;
}
/**
* 僀儞僩儔儅乕僩偱愝掕偝傟偰偄傞DB傊偺僐僱僋僔儑儞傪庢摼偟傑偡丅
*
* @return 僀儞僩儔儅乕僩偱愝掕偝傟偰偄傞DB傊偺僐僱僋僔儑儞
* @throws DataConnectException 僨乕僞儀乕僗愙懕帪偵椺奜偑敪惗
* @throws DataPropertyException 僨乕僞僾儘僷僥傿庢摼帪偵椺奜偑敪惗
*/
public DbsConnection getConnection()
throws DataConnectException, DataPropertyException {
if (this.connection == null) {
this.connection = this.connector.getConnection(this.connect);
}
return this.connection;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -