public class SqlStub extends AbstractStub
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
PARAM_DRIVERNAME |
static String |
PARAM_JNDINAME |
static String |
PARAM_PASSWORD |
static String |
PARAM_URL |
static String |
PARAM_USER |
| 构造器和说明 |
|---|
SqlStub() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close(Connection conn)
关闭库连接
|
void |
create(StubCommand cmd)
创建数据表
|
void |
delete(StubCommand cmd)
删除表数据
|
void |
destroy() |
void |
exists(StubCommand cmd)
检查表是否存在
|
protected Object[] |
getCondition(StubCommand cmd,
int length)
获取条件
|
protected Connection |
getConnection(StubCommand cmd)
获取库连接
|
protected DataSource |
getDataSource() |
protected Dialect |
getDialect() |
protected String |
getDriverName() |
protected String |
getJndiName() |
protected String |
getPassword() |
protected String |
getUrl() |
protected String |
getUser() |
void |
initial() |
protected void |
initialStandard(StubCommand cmd)
初始标准化
|
void |
insert(StubCommand cmd)
插入表数据
|
protected Object |
modify(String operate,
Class<?> table,
Object[] condition,
Connection conn)
修改操作
|
void |
remove(StubCommand cmd)
删除数据表
|
void |
select(StubCommand cmd)
查询表数据
|
void |
update(StubCommand cmd)
修改表数据
|
getParameter, getParameters, operate, orderprotected void initialStandard(StubCommand cmd)
cmd - protected String getJndiName()
protected String getDriverName()
protected String getUrl()
protected String getUser()
protected String getPassword()
protected DataSource getDataSource()
protected Dialect getDialect()
protected Connection getConnection(StubCommand cmd)
public void create(StubCommand cmd)
public void insert(StubCommand cmd)
public void delete(StubCommand cmd)
public void update(StubCommand cmd)
public void select(StubCommand cmd)
public void exists(StubCommand cmd)
cmd - public void remove(StubCommand cmd)
protected Object[] getCondition(StubCommand cmd, int length)
cmd - length - protected Object modify(String operate, Class<?> table, Object[] condition, Connection conn)
operate - table - condition - conn - public void close(Connection conn)
conn - Copyright © 2024. All rights reserved.