public class DBBeanBase extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected Connection |
con |
protected String |
dataSourceName |
protected DBResult |
dbResult |
protected boolean |
isTransaction |
protected static com.ds.common.logging.Log |
log
Commons Logging instance.
|
protected static int |
nConCount |
PreparedStatement |
prestatm |
protected int |
resultcolumns |
protected int |
resultrows |
protected ResultSet |
resultset |
Statement |
statm |
protected String |
strSql |
protected long |
tm |
| 构造器和说明 |
|---|
DBBeanBase(Connection con,
boolean value) |
DBBeanBase(String configKey)
默认构造方法,不进行事务处理
|
DBBeanBase(String configKey,
boolean value)
构造方法
参数——value 值 true——表示要进行事务处理
false——表示不进行事务处理
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected static void |
changeCount(int nChange)
纪录连接的数量
|
void |
close()
Close the result set and release resources
|
boolean |
commit()
Insert the method's description here.
|
protected void |
createDBResult() |
int |
executePreparedQuery()
执行准备好的SQL
|
int |
executePreparedUpdate()
执行准备好的SQL
|
int |
executeQuery(String strSql)
Execute query.
|
int |
executeUpdate(String strSql)
Execute update.
|
Connection |
getConn()
取得DBBean内的连接,可能是null
|
protected Connection |
getConnection(String configKey)
从连接池中得到数据库的连接
|
DBResult |
getSelectDBResult() |
boolean |
isClosed() |
boolean |
prepareSql(String strPreSql)
准备SQL
|
boolean |
rollback()
Insert the method's description here.
|
void |
setCharacterStream(int parameterIndex,
Reader reader,
int length) |
void |
setDate(int index,
Date value) |
void |
setFloat(int index,
float value) |
void |
setInt(int index,
int value) |
void |
setLong(int index,
long value) |
void |
setNull(int index,
int sqlType) |
void |
setSelectDBResult(DBResult rs) |
void |
setString(int index,
String value) |
void |
setTime(int index,
Timestamp value) |
protected Object |
valueAtColumnRow(int column,
int row)
Utility method to get the value at a specific row and column index
|
protected static com.ds.common.logging.Log log
protected static int nConCount
protected String dataSourceName
protected Connection con
public Statement statm
public PreparedStatement prestatm
protected ResultSet resultset
protected long tm
protected boolean isTransaction
protected int resultrows
protected int resultcolumns
protected DBResult dbResult
protected String strSql
public DBBeanBase(String configKey)
public DBBeanBase(String configKey, boolean value)
public DBBeanBase(Connection con, boolean value)
protected static void changeCount(int nChange)
protected Connection getConnection(String configKey)
public int executeQuery(String strSql)
public int executeUpdate(String strSql)
protected void createDBResult()
public DBResult getSelectDBResult()
public void setSelectDBResult(DBResult rs)
protected Object valueAtColumnRow(int column, int row) throws ArrayIndexOutOfBoundsException
column - the column containing the desired datarow - the row containing the desired dataArrayIndexOutOfBoundsException - thrown when there is no data at the specified rowpublic void close()
public boolean commit()
public boolean rollback()
public boolean prepareSql(String strPreSql)
public int executePreparedQuery()
public int executePreparedUpdate()
public void setInt(int index,
int value)
public void setString(int index,
String value)
public void setDate(int index,
Date value)
public void setFloat(int index,
float value)
public void setTime(int index,
Timestamp value)
public void setLong(int index,
long value)
public void setNull(int index,
int sqlType)
public void setCharacterStream(int parameterIndex,
Reader reader,
int length)
public boolean isClosed()
public Connection getConn()
Copyright © 2023 onecode. All rights reserved.