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() |
protected Object |
each(Object table,
net.isger.util.Callable<Object> callable)
遍历操作
|
protected Object[] |
getCondition(StubCommand cmd,
int type)
获取条件
|
protected Connection |
getConnection()
获取库连接
|
protected DataSource |
getDataSource() |
protected Dialect |
getDialect() |
protected String |
getDialectName() |
protected String |
getDriverName() |
protected String |
getJndiName() |
protected String |
getPassword() |
protected String |
getUrl() |
protected String |
getUser() |
void |
initial() |
void |
insert(StubCommand cmd)
插入表数据
|
protected Object |
modify(String operate,
Class<?> table,
Object[] condition,
Connection conn)
修改操作
|
void |
remove(StubCommand cmd)
删除数据表
|
void |
search(StubCommand cmd)
查询表数据
|
void |
update(StubCommand cmd)
修改表数据
|
public void initial()
initial 在接口中 net.isger.util.Manageableinitial 在类中 net.isger.brick.core.BaseGateprotected String getDialectName()
protected String getJndiName()
protected String getDriverName()
protected String getUrl()
protected String getUser()
protected String getPassword()
protected DataSource getDataSource()
protected Dialect getDialect()
protected Connection getConnection()
public void create(StubCommand cmd)
public void insert(StubCommand cmd)
public void delete(StubCommand cmd)
public void update(StubCommand cmd)
public void search(StubCommand cmd)
public void remove(StubCommand cmd)
protected Object each(Object table, net.isger.util.Callable<Object> callable)
table - callable - protected Object[] getCondition(StubCommand cmd, int type)
cmd - type - protected Object modify(String operate, Class<?> table, Object[] condition, Connection conn)
operate - table - condition - conn - public void close(Connection conn)
conn - public void destroy()
destroy 在接口中 net.isger.util.Manageabledestroy 在类中 net.isger.brick.core.BaseGateCopyright © 2016. All rights reserved.